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
The <dfn method for="ServiceWorker"><code>postMessage(|message|, |options|)</code></dfn> method *must* run these steps:
374
+
365
375
1. If the {{ServiceWorker/state}} attribute value of the <a>context object</a> is {{"redundant"}}, [=throw=] an "{{InvalidStateError}}" {{DOMException}}.
366
376
1. Let |serviceWorker| be the [=/service worker=] represented by the <a>context object</a>.
367
377
1. Invoke <a>Run Service Worker</a> algorithm with |serviceWorker| as the argument.
368
378
1. Let |incumbentSettings| be the <a>incumbent settings object</a>, and |incumbentGlobal| its [=environment settings object/global object=].
369
-
1. Let |serializeWithTransferResult| be <a abstract-op>StructuredSerializeWithTransfer</a>(|message|, |transfer|). Rethrow any exceptions.
379
+
1. Let |serializeWithTransferResult| be <a abstract-op>StructuredSerializeWithTransfer</a>(|message|, |options|.transfer). Rethrow any exceptions.
370
380
1. [=Queue a task=] on the [=DOM manipulation task source=] to run the following steps:
371
381
1. Let |source| be determined by switching on the type of |incumbentGlobal|:
The <dfn method for="Client"><code>postMessage(|message|, |options|)</code></dfn> method *must* run these steps:
1073
+
1054
1074
1. Let |sourceSettings| be the <a>context object</a>'s <a>relevant settings object</a>.
1055
1075
1. Let |destination| be the {{ServiceWorkerContainer}} object whose [=ServiceWorkerContainer/service worker client=] is the <a>context object</a>'s [=Client/service worker client=], or null if no match is found.
1056
1076
1. If |destination| is null, <a>throw</a> an "{{InvalidStateError}}" {{DOMException}}.
1057
-
1. Let |serializeWithTransferResult| be <a abstract-op>StructuredSerializeWithTransfer</a>(|message|, |transfer|). Rethrow any exceptions.
1077
+
1. Let |serializeWithTransferResult| be <a abstract-op>StructuredSerializeWithTransfer</a>(|message|, |options|.transfer). Rethrow any exceptions.
1058
1078
1. Add a <a>task</a> that runs the following steps to |destination|'s [=ServiceWorkerContainer/client message queue=]:
1059
1079
1. Let |origin| be the [=Unicode serialization of an origin|Unicode serialization=] of |sourceSettings|'s [=environment settings object/origin=].
1060
1080
1. Let |source| be a {{ServiceWorker}} object, which represents the [=ServiceWorkerGlobalScope/service worker=] associated with |sourceSettings|'s [=environment settings object/global object=].
0 commit comments