mirror of
https://github.com/facebook/react.git
synced 2026-02-24 20:53:03 +00:00
Addresses https://github.com/facebook/react/issues/32244. ### Chromium We will use [chrome.permissions](https://developer.chrome.com/docs/extensions/reference/api/permissions) for checking / requesting `clipboardWrite` permission before copying something to the clipboard. ### Firefox We will keep `clipboardWrite` as a required permission, because there is no reliable and working API for requesting optional permissions for extensions that are extending browser DevTools: - `chrome.permissions` is unavailable for devtools pages - https://bugzilla.mozilla.org/show_bug.cgi?id=1796933 - You can't call `chrome.permissions.request` from background, because this instruction has to be executed inside user-event callback, basically only initiated by user. I don't really want to come up with solutions like opening a new tab with a button that user has to click.
The Chrome 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:extension:chrome from the root directory.
Testing in Chrome
You can test a local build of the web extension like so:
- Build the extension:
node build - Follow the on-screen instructions.