-
Notifications
You must be signed in to change notification settings - Fork 316
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
Adding self.serviceWorker to service workers. #1426
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great... if it's not too much of a hassle, it might also be worth splitting this into two PRs: one with the "getting the service worker object" algorithm and one that adds self.serviceWorker. For self.serviceWorker, it might be worth pinging the issue or here for more visibility?
Good point. I'll split it up. |
Ok, this is only about |
Assuming we want |
Seems OK to expose "parsed". I'm a bit curious now how that name was chosen. Is it better than something like "initial"? Really naive question but is JavaScript specified to do parsing before starting execution? |
I never thought about changing the name. "initial" seems ok. It could also be "pending", "pendingInstall", "beforeInstall", "preinstall".
I think there are cases where v8 defers parsing parts of some functions, but the top level has been parsed at this point. |
Right, if there was a syntax error you would not have gotten to the point of executing the script. |
I think I'm favouring "preinstall". Anyone hating that? |
Let's stick with "parsed". It's past tense like "installed" & "activated". |
Fixes #1077.
Tests web-platform-tests/wpt#17285
Preview | Diff