URL function not available in worker context

RESOLVED DUPLICATE of bug 813253

Status

()

Core
DOM: Workers
RESOLVED DUPLICATE of bug 813253
5 years ago
5 years ago

People

(Reporter: aviynw, Unassigned)

Tracking

18 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.70 Safari/537.17

Steps to reproduce:

Launched a dedicated web worker.  Tried to access self.URL


Actual results:

got error that URL is not defined


Expected results:

I should have been able to access the equivalent function that is window.URL in the main thread.  The reason I want access to this function is because I'm launching workers and subworkers that are created with inline text.  To accomplish this I need access to URL.createObjectURL.  my code roughly looks as follows

var blob = new Blob(["onmessage = function(e) { postMessage('msg from worker'); }"]);
var blobURL = self.URL.createObjectURL(blob);
var worker = new Worker(blobURL);

In chrome, workers have access to this URL function (though chrome doesn't support creating subworkers).  Is there a reason firefox chose not to include this feature
Component: Untriaged → DOM
Product: Firefox → Core
Other than it requiring extra work to port things to workers and no one having done that work yet?  Unclear.  Ben?
Component: DOM → DOM: Workers
This should be a dup of bug 813253, which just landed.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 813253
You need to log in before you can comment on or make changes to this bug.