Thanks. Three paths I have been thinking about are 1) some means to get a
reference to arbitrary Window object in the ServiceWorker; 2) locating all
Chromium ServiceWorker dependencies and extracting that code to create a
standalone, dedicated MessageChannel between ServiceWorker and arbitrary
Web pages; 3) locating all Chromium ServiceWorker dependencies and
extracting that code to create a standalone ServiceWorker mapped to
localhost to use as a local server.

Right now I am dynamically setting externally_connectable of an extension
to arbitrary Web pages and using the JSON-based messaging system extensions
use to stream from Native Messaging host to ServiceWorker then to Web page.
Preferably we could use transferable objects or just the onfetch handler of
the ServiceWorker. I imagine neither option is a simple task.

On Mon, Jan 30, 2023 at 5:31 AM Ben Noordhuis <i...@bnoordhuis.nl> wrote:

> On Sun, Jan 29, 2023 at 4:30 PM guest271314 <guest271...@gmail.com> wrote:
> >
> > Is it possible to use DevTools Runtime.addBinding to create a
> MessageChannel pairing between MessagePort in extension ServerWorker and
> MessagePort created by the function in arbitrary Web page?
>
> No. addBinding adds a single-arg function to the execution context. It
> sends a 'bindingCalled' event (plus the string argument) to the
> inspector client when called. And that's all it does.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-users/lWJml4bZh0k/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-users/CAHQurc_UvZsrbAvnuowQ%2BrZyR5h8MjrgRTiYNCnyd17QXWZ00Q%40mail.gmail.com
> .
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/CA%2BsyWAN5ewenQn%3DjpiJNWVV%2BdwM8_bVN22Hd2U6C26N%2B6awxzA%40mail.gmail.com.

Reply via email to