<br>On Wed, Nov 12, 2008 at 3:35 PM, Ian Hickson <span dir="ltr"><ian@hixie.ch></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
(cc'ed whatwg -- sorry if that wasn't what you intended)<br>
<br>
On Wed, 27 Aug 2008, Michael Nordman wrote:<br><div class="Ih2E3d">
<br>
> > > Is it possible for a worker (shared or dedicated) to reload itself?<br>
> ><br>
> > Not currently.<br>
><br>
</div>> For dedicated workers, this can effectively be accomplished already by<br>
> one of the two means of close()ing a worker and then starting a new one<br>
> and then handing out ports as needed.<br>
><br>
> But for shared workers, this is a more interesting question. Provided<br>
> clients of the shared worker (those that have a reference to it) can be<br>
> relied on to restart it upon onclose(), reload() would effectively<br>
> happen. Are there any windows of time where a shared worker executes w/o<br>
> a client having a reference it?<br>
<br>
Yes. Any worker can survive, e.g. if it has timers running, until its<br>
parent window (or any window that it ever spoke to) closes the document<br>
it is associated with.<br>
<br>
I don't really see the use case for self-reloading. Do scripts self-reload<br>
in general?<br>
</blockquote><div><br>For people who want to update script in SharedWorker, could they do it by making the SharedWorker merely a shell?<br><br>The SharedWorker would create a Worker to do everything. If a reload is needed, then the SharedWorker closes the Worker and starts it again (just like the dedicated worker method described above).<br>
<br>Dave<br><br></div></div><br>