Changes

Jump to: navigation, search

DOMWorkerThreads

317 bytes removed, 00:12, 16 August 2008
no edit summary
</blockquote>
<code>connectToSharedWorker</code> creates a two new <code>WorkerMessagePort</code> object if none exists for which are entangled with each other. One of the given namethat interacts with two ports is returned, and the other is sent to the same <code>WorkerGlobalScopeWorker</code> as any previously existing with the given name. If such a <code>Worker</code>sdoes not yet exist, one is created.
When a shared The <code>Worker</code> receives a message it can send data back to the sender using the other <code>Event.sourceMessagePort</code> property which is a through an <code>WorkerParentonconnect</code>. Using <code>WorkerGlobalScope.postMessageEvent</code> and fired on the <code>WorkerGlobalScope.onmessage</code> results in a message being sent to the first context that opened the shared worker (or nothing if that context is dead). Downsides with this proposal:* There is no way to communicate back unless first communicated to.* The special treatment of the first context to open a shared workerobject.
Confirm
716
edits

Navigation menu