Confirmed users
716
edits
No edit summary |
No edit summary |
||
| Line 138: | Line 138: | ||
Downsides with this proposal: | Downsides with this proposal: | ||
* There is no way to communicate back unless first communicated to. | * There is no way to communicate back unless first communicated to. | ||
* The first one to instantiate a shared worker get special treatment. | |||
=== Proposal 2 === | === Proposal 2 === | ||
| Line 162: | Line 163: | ||
The <code>Worker</code> receives the other <code>MessagePort</code> through an <code>onconnect</code> <code>Event</code> fired on the <code>WorkerGlobalScope</code> object. | The <code>Worker</code> receives the other <code>MessagePort</code> through an <code>onconnect</code> <code>Event</code> fired on the <code>WorkerGlobalScope</code> object. | ||
* There is no way to get a reference to the shared <code>Worker</code> object itself. | |||
* Communication for shared workers is different from communication for non-shared ones. | |||