Closed lenkan closed 2 weeks ago
Hopefully in the future it might be possible to dynamically add urls to "externally_connectable".
During discussion with @rodolfomiranda @2byrds @HunnySajid we agreed that it is best to replace externally_connectable with a window.postMessage based pattern.
Quick update: I believe @HunnySajid has tested with @lenkan PR https://github.com/WebOfTrust/polaris-web/pull/11 and would like to transition it to being accepted and merged soon so that both extensions are working with the same polaris-web.
Quick update: I believe @HunnySajid has tested with @lenkan PR https://github.com/WebOfTrust/polaris-web/pull/11 and would like to transition it to being accepted and merged soon so that both extensions are working with the same polaris-web.
Thanks for the update! I've been AFK this week so will get back regarding that ASAP, at least during next week.
We can close this as externally_connectable
is removed from extension. All communication is being done with window.postMessage
See manifest: https://github.com/WebOfTrust/signify-browser-extension/blob/70d4f05e87d4c4d12beb6a9376505d1ff948945f/manifest.json#L42
The URL specified is not valid according to chrome: https://developer.chrome.com/docs/extensions/reference/manifest/externally-connectable
I assume an extension with that manifest will never be approved by chrome store. In addition, as I am sure most of the readers here are aware, this feature is not available in firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1319168.
Proposed solution
Because of these two issues, I suggest to not use this feature. We can just pass message to the content script using window.postMessage. This way, you can also omit the browser check in polaris-web https://github.com/WebOfTrust/polaris-web/blob/697eb6ad276fa6c48ed351c6d5be170514a9d333/index.js#L134
@rodolfomiranda @HunnySajid @2byrds What do you think?