You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Let destination be the ServiceWorkerContainer object whose
service worker client is the context object’s service worker client,
or null if no match is found.
3. If destination is null, throw an "InvalidStateError" DOMException.
This is problematic for a few reasons:
Most postMessage() implementations don't throw. They just silently consume the message if the other end is no longer listening. For example Worker.postMessage() and MessageChannel, etc.
The lookup of the destination is presented as synchronous in the spec, but it must be async in any cross-process browser implementation.
If we wanted we could change postMessage() to return a promise, but its probably better to just silently eat the message.