we (web engine): Experimental web browser project to understand the limits of Claude
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Service worker client management and messaging #211

open opened by pierrelf.com

Implement client tracking and messaging for controlled documents.

Scope:

  • Track window clients by origin, URL, visibility/focus state where available, and controlling service worker registration.
  • Add Clients.matchAll(), Clients.openWindow(), Client.postMessage(), client.url, client.id, and controllerchange events.
  • Wire navigator.serviceWorker.controller and message events on documents.
  • Reuse structured clone for postMessage between document and service worker contexts.
  • Ensure clients.claim() updates eligible clients and dispatches controllerchange.

Acceptance criteria:

  • Tests cover matchAll filtering, controller assignment, clients.claim(), document-to-worker and worker-to-document postMessage, and structured clone errors.
  • E2E scenario demonstrates a registered active worker receiving a message and replying to the page.
  • Behavior remains origin-isolated.
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:meotu43t6usg4qdwzenk4s2t/sh.tangled.repo.issue/3mm26vl5xi22v