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

Add support for Firefox #177

Closed
davidjayb opened this issue Nov 25, 2023 · 4 comments · Fixed by #185
Closed

Add support for Firefox #177

davidjayb opened this issue Nov 25, 2023 · 4 comments · Fixed by #185
Labels
committed This issue has been added to the roadmap

Comments

@davidjayb
Copy link
Contributor

davidjayb commented Nov 25, 2023

It would be great to add support for Firefox to the devtools. It looks as though the developer tools API for Firefox is based off of Chromium, with some limitations:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Extending_the_developer_tools

Building and loading this locally I receive the following error:

background.service_worker is currently disabled

This lead me to the following issue:

mozilla/web-ext#2532

Firefox does not support service workers at the moment. Changing from service_worker to scripts allows me to load the extension:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background

I then receive a warning message about the web_accessible_resources.world property, which isn't supported:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/web_accessible_resources

Which was also encountered by the EmberJS team, resolved by moving the resource under content_scripts:
emberjs/ember-inspector#2501

After getting the warnings removed I am able to load the plugin it does not detect Svelte.

@ignatiusmb
Copy link
Member

Thank you for the investigation! I haven't fully recovered yet so it may take a while before the next release, but the next minor will include the files for both Chrome and Firefox users to install the extension locally. I managed to get it working on Firefox when I was working on #137

@ignatiusmb ignatiusmb added the committed This issue has been added to the roadmap label Nov 27, 2023
@nemkicsiaron
Copy link

Thank you for the investigation! I haven't fully recovered yet so it may take a while before the next release, but the next minor will include the files for both Chrome and Firefox users to install the extension locally. I managed to get it working on Firefox when I was working on #137

That is fantastic

@ignatiusmb
Copy link
Member

I was trying to hold off the next minor for Firefox support, but in an effort to get the ball rolling again, I'll cut a quick minor release for the inspector button as mentioned in #166 (comment). Thank you for waiting, Firefox users :)

@ignatiusmb
Copy link
Member

The PR has been merged! There's still a couple of things to polish like the font-size not adjusting with the zoom level (unlike chromium-based browsers), but we can now use the extension with Firefox by loading it as a temporary add-on. Be sure to also enable "Always Allow on localhost" in the extension settings.

Simply grab the .zip file from the next latest releases, those who are eager to use it immediately can download the artifact from the action job at https://github.com/sveltejs/svelte-devtools/actions/runs/8434582496 (you might need to be logged in), or build them yourself by running the "build" script and then "build:tar" for Windows or "build:zip" for others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
committed This issue has been added to the roadmap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants