comlink
comlink copied to clipboard
PR: WebExtensions Port API to endpoint adapter
I am authoring a web app backed by a chrome extension. Basically I'm using the extension's background page as a web worker equivalent.
Turns out it's trivial to convert the runtime.port API to comlink endpoint. So I write an adapter for it, thus this PR.
I wonder if you think this is worth including in the core lib, like with node-adapter, or think it's out of scope and prefer I publish an individual package.
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.
ℹ️ Googlers: Go here for more info.
This provide a solution to #129
Yes it is not work in my case in browser with webextensions from there https://github.com/GoogleChromeLabs/comlink/issues/129 @felixfbecker maybe you know some workaround there?