fix[devtools/extension]: added a workaround for proxy content script injection in firefox (#27375)
Changes: 1. [Firefox-only] For some reason, Firefox might try to inject dynamically registered content script in pages like `about:blank`. I couldn't find a way to change this behaviour, `about:` is not a valid scheme, so we can't exclude it and `match_about_blank` flag is not supported in `chrome.scripting.registerContentScripts`. 2. While navigating the history in Firefox, some content scripts might not be re-injected and still be alive. To handle this, we are now patching `window` with `__REACT_DEVTOOLS_PROXY_INJECTED__` flag, to make sure that proxy is injected and only once. This flag is cleared on `pagehide` event.
R
Ruslan Lesiutin committed
f9d75e32ba85b3c6a2a5d20fa27ba7e23d5529b2
Parent: 9ba1bbd
Committed by GitHub <noreply@github.com>
on 9/22/2023, 6:36:03 PM