On Tue, Mar 3, 2009 at 12:52 PM, dviner <[email protected]> wrote: > > Ahh... I see. > > Out of curiosity, what is the base of a worker context? The main > context seems to be identical to the location of the html page on > which the javascript is executed.
The worker.js file location for workers created with a URL (createWorkerFromUrl()). Or the location of the parent context (generally the main html page) for workers created with a string (createWorker()) > > Thanks for your help! > Dave Viner > > > On Mar 3, 12:50 pm, Michael Nordman <[email protected]> wrote: >> > The page itself (the page which loads the main javascript) is in the >> > same domain (clearly), but at a different URL, not under /javascript/ >> > (as you might imagine). >> >> And there it is. Relative urls will be considered as relative to >> different locations in the main vs worker contexts. >> >> Try... >> previewUrl = "/blobs/" + jQuery.uuid(); >> ... the leading "/" will put the url at the top level of the origin >> regardless of nested location of the main vs worker context. >
