-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
enhancementEnhancement or change to an existing featureEnhancement or change to an existing feature
Description
Context
Chromium browsers support a externally_connectable manifest key that enables websites to message the extension directly and securely
However, the list of externally_connectable sites is static in the manifest. Therefore, the primary current use case is connecting to the website associated with the extension
As there are many non site-specific extensions, making the list of externally_connectable sites to be dynamic (similar to optional hosts) would allow deeper extensibility between sites and these extensions. In this world, browser extension authors could provide a companion JS library that website developers would use to make their site customizable/extensible via the browser extension
Request
- Include support for
externally_connectablein the web extension standard - Allow the list to be modified using
browser.permissionsor a similar API - Provide a way for a website to signal that it supports that browser extension via
externally_connectable, so that the extension can react even if it doesn't have the activeTab permission yet (E.g., by confirming that the user should see a permissions prompt to give access). Potential methods: an HTML meta tag, an JS API available to the external site, e.g.,browsers.permissions.acceptExtensions(ids)
References
- https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/externally_connectable
- A "polyfill" using
document.defaultView.postMessagewhich requires access to the page to inject a content script: http://github.com/pixiebrix/pixiebrix-extension/blob/9acb556f36e5bf99d35daeb3dc1d77c0c9565287/src/contentScript/externalProtocol.ts#L191-L191
georgehenderson, dylanb, fregante, Vmodi2, jcblw and 1 more
Metadata
Metadata
Assignees
Labels
enhancementEnhancement or change to an existing featureEnhancement or change to an existing feature