Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worker's creation URL is set before worker global scope's url is set #3771

Open
hiroshige-g opened this issue Jun 22, 2018 · 1 comment
Open

Comments

@hiroshige-g
Copy link
Contributor

In https://html.spec.whatwg.org/#set-up-a-worker-environment-settings-object,
Step 7 sets settings object's creation URL to worker global scope's url at the time of #set-up-a-worker-environment-settings-object (i.e. Step 9 of https://html.spec.whatwg.org/#run-a-worker).

However, at that time, worker global scope's url is not yet set (which will be set in Step 13's custom fetch steps' Step 3).

Before [1], the creation URL was worker global scope's url at the time of referencing creation URL (which is assumed after worker global scope's url is set) and thus was response's URL.

[1] 2b93f9e

Should creation URL still be the response URL of the top-level worker script?
Or should it be something else?

@jungkees as the author of [1], @nhiroki for workers.

@wanderview
Copy link
Member

Based on the discussion in w3c/ServiceWorker#1034 we intended for the worker Client.url (creation URL) to be the empty string until execution ready. Then it should be set to the final response URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants