[whatwg] SharedWorkers and the name parameter

On Tue, 25 Aug 2009, Jim Jewett wrote:
> On Tue, Aug 25, 2009 at 7:24 PM, Ian Hickson<ian at hixie.ch> wrote:
> > Drew Wilson wrote:
> >> Per section 4.8.3 of the SharedWorkers spec, if a page loads a shared 
> >> worker with a url and name, it is illegal for any other page under 
> >> the same origin to load a worker with the same name
> > 
> > The idea here is that if you have an app that does database 
> > manipulation, you might want to ensure there is only ever one shared 
> > worker doing the manipulation, so you might decide on a shared worker 
> > name that is in charge of that, and then you can be sure that you 
> > don't accidentally start two workers with that name using different 
> > copies of a script
> 
> So the name is really intended as a (lightweight) URN, but it can 
> default to the URL?

The name is an opaque string. It can be whatever you want.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 1 September 2009 16:12:57 UTC