An alternative would be to make the "name" parameter optional, where omitting the name would create an unnamed worker that is identified/shared only by its url.<div><br></div><div>So pages would only specify the name in cases where they actually want to have multiple instances of a shared worker.</div>
<div><br></div><div>-atw<br><br><div class="gmail_quote">On Tue, Aug 18, 2009 at 7:01 PM, Jonas Sicking <span dir="ltr"><jonas@sicking.cc></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Tue, Aug 18, 2009 at 3:08 PM, Jeremy Orlow<<a href="mailto:jorlow@chromium.org">jorlow@chromium.org</a>> wrote:<br>
> On Tue, Aug 18, 2009 at 1:22 PM, Jonas Sicking <jonas@sicking.cc> wrote:<br>
>><br>
>> On Tue, Aug 18, 2009 at 12:00 AM, Darin Fisher<<a href="mailto:darin@chromium.org">darin@chromium.org</a>> wrote:<br>
>> > I agree. Moreover, since a shared worker identified by a given name<br>
>> > cannot<br>
>> > be "navigated" elsewhere, the name isn't all that synonymous with other<br>
>> > usages of names (e.g., window.open). At the very least, it would seem<br>
>> > helpful to scope the name to the URL to avoid the name conflict issue.<br>
>> > -Darin<br>
>><br>
>> Technically, that can already be done by using the current the current<br>
>> URL as the name.<br>
><br>
> I don't quite understand. Are you suggesting that you can work around this<br>
> by passing the same parameter twice when creating a shared worker? If so,<br>
> that seems ugly...and a sign that it should be changed.<br>
<br>
</div></div>No, what I mean is that if you want to create a worker shared with<br>
other instances of the same page, without having to worry about<br>
collisions from other pages on your site, you can do:<br>
<br>
worker = new SharedWorker("/scripts/workerJSFile.js", document.location);<br>
<br>
This way you can be sure that no other page on your site happen to use<br>
the same name.<br>
<font color="#888888"><br>
/ Jonas<br>
</font></blockquote></div><br></div>