Files
react/packages/react-devtools-extensions/firefox
Ruslan Lesiutin 8fbd307942 refactor: refactored devtools browser extension scripts to improve port management and service worker lifetime (#27215)
Fixes https://github.com/facebook/react/issues/27119,
https://github.com/facebook/react/issues/27185.

Fixed:
- React DevTools now works as expected when user performs in-tab
navigation, previously it was just stuck.


https://github.com/facebook/react/assets/28902667/b11c5f84-7155-47a5-8b5a-7e90baca5347

- When user closes browser DevTools panel, we now do some cleanup to
disconnect ports and emit shutdown event for bridge. This should fix the
issue with registering duplicated fibers with the same id in Store.

Changed:
- We reconnect proxy port once in 25 seconds, in order to [keep service
worker
alive](https://developer.chrome.com/docs/extensions/whatsnew/#m110-sw-idle).
- Instead of unregistering dynamically injected content scripts, wen now
get list of already registered scripts and filter them out from scripts
that we want to inject again, see dynamicallyInjectContentScripts.js.
- Split `main.js` and `background.js` into multiple files.

Tested on Chromium and Firefox browsers.
2023-08-29 12:09:26 +01:00
..
2019-08-13 15:59:43 -07:00

The Firefox extension

The source code for this extension has moved to shells/webextension.

Modify the source code there and then rebuild this extension by running node build from this directory or yarn run build:firefox from the root directory.

Testing in Firefox

  1. Build the extension: node build
  2. Follow the on-screen instructions.

You can test upcoming releases of Firefox by downloading the Beta or Nightly build from the Firefox releases page and then following the on-screen instructions after building.