Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web-extension): detect bg script when on firefox - LW-11944 #1580

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mirceahasegan
Copy link
Collaborator

Context

Make bg script detection more robust
Firefox runs background script in a hidden page,
so it has a window object.

Proposed Solution

Check for runtime.getBackgroundPage function which exists in firefox only on background page.

Important Changes Introduced

rhyslbw
rhyslbw previously approved these changes Feb 3, 2025
@mirceahasegan
Copy link
Collaborator Author

there are some unit tests failing. I will fix them shortly

rhyslbw
rhyslbw previously approved these changes Feb 3, 2025
@mirceahasegan mirceahasegan marked this pull request as draft February 4, 2025 16:44
Firefox runs background script in a hidden page,
so it has a window object.
@mirceahasegan mirceahasegan force-pushed the feat/detect-background-script-on-firefox branch from 74443fd to 029cc2c Compare February 5, 2025 10:17
@mirceahasegan mirceahasegan self-assigned this Feb 5, 2025
@mirceahasegan mirceahasegan marked this pull request as ready for review February 5, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants