-
Notifications
You must be signed in to change notification settings - Fork 3
Copy to clipboard isn't working in the browser devtools #19
Copy link
Copy link
Open
Description
Bug
When clicking on the copy to clipboard button for multiaddrs, the multiaddr isn't copied and an error is logged
Why?
One thing I don't understand is why the copy-to-clipboard event, which originates from the devtools panel, and sent using postMessage is handled in two places:
- content script: https://github.com/ipshipyard/js-libp2p-inspector/blob/main/packages/libp2p-devtools/src/content-script.ts/#L52
- in the service worker: https://github.com/ipshipyard/js-libp2p-inspector/blob/main/packages/libp2p-devtools/src/service-worker.ts/#L63
The service worker error is showing up, I suspect, because host_permissions is not defined in the manifest.json, causing chrome.scripting.executeScript() to fail when trying to inject into the active page.
Whereas the content-script handler is failing for a different reason:

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels