Bug 1319168 Comment 47 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Implementation note: When the implementation commences, we need to make sure that `window.browser` in content scripts return the extension API of the content script (instead of the web page), to minimize the chance of regressions. For the context of that, see https://github.com/w3c/webextensions/pull/508#issuecomment-1912200989

(In reply to guest271314 from comment #46)
> Firefox implementing `"externally_connectable"` is basically catching up to Chrome - years later. Because Apple did it?

The reason for reconsidering the implementation is in comment 45: when the bug was filed, any host permissions granted by extensions were granted at install time. Since then, we have added UI for users to toggle permissions. This means that extension authors have to account for the possibility that the requested host permissions have not been granted. The `externally_collectable` feature enables websites to communicate with extensions even if the host permission has been denied.

> What you can do that is modern is the implementation. Instead of using IPC (JSON essentially) as Chromium-based browsers do (for Native Messaging, too JSON is used) utilize Transferable Streams for the data exchange https://bugs.chromium.org/p/chromium/issues/detail?id=1214621.

Firefox's extension messaging APIs are not limited to JSON, but use serializable cloning.
I'm in favor of more efficient messaging mechanisms, but that is independent of the work in this bug. In case you're curious, my thoughts (and responses from other browser vendors) are at: https://github.com/w3c/webextensions/issues/293#issuecomment-1310203017
Implementation note: When the implementation commences, we need to make sure that `window.browser` in content scripts return the extension API of the content script (instead of the web page), to minimize the chance of regressions. For the context of that, see https://github.com/w3c/webextensions/pull/508#issuecomment-1912200989

(In reply to guest271314 from comment #46)
> Firefox implementing `"externally_connectable"` is basically catching up to Chrome - years later. Because Apple did it?

The reason for reconsidering the implementation is in comment 45: when the bug was filed, any host permissions granted by extensions were granted at install time. Since then, we have added UI for users to toggle permissions. This means that extension authors have to account for the possibility that the requested host permissions have not been granted. The `externally_connectable` feature enables websites to communicate with extensions even if the host permission has been denied.

> What you can do that is modern is the implementation. Instead of using IPC (JSON essentially) as Chromium-based browsers do (for Native Messaging, too JSON is used) utilize Transferable Streams for the data exchange https://bugs.chromium.org/p/chromium/issues/detail?id=1214621.

Firefox's extension messaging APIs are not limited to JSON, but use serializable cloning.
I'm in favor of more efficient messaging mechanisms, but that is independent of the work in this bug. In case you're curious, my thoughts (and responses from other browser vendors) are at: https://github.com/w3c/webextensions/issues/293#issuecomment-1310203017

Back to Bug 1319168 Comment 47