-
Notifications
You must be signed in to change notification settings - Fork 312
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
Add Client.frameType back #1329
Conversation
This change adds Client.frameType back with the reasons: - Implementations maintain it. - It can be accessed outside of fetch event handlers This change also improved the steps of the algorithms that Create Window Client invokes by removing unnecessary parallel steps. Fixes: #732.
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.
It looks like the WPT for frameType already exist, so nothing needs to change there.
docs/index.bs
Outdated
1. If |windowClient|'s <a>focus state</a> is true, resolve |promise| with |windowClient|. | ||
1. Else, reject |promise| with a <code>TypeError</code>. | ||
1. [=Queue a task=] to run the following steps on the [=context object=]'s associated [=Client/service worker client=]'s [=responsible event loop=] using the [=user interaction task source=]: | ||
1. Run the [=focusing steps=] with the current [=/browsing context=]. |
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.
Should "this be the [=context object=]'s associated [=/browsing context=]", for clarity and consistency with line 1089? (I would think current browsing context refers to the service worker's browsing context, if that exists)
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.
Thanks for reviewing it! I used the current as a browsing context has an event loop, and the queued task is running in the browsing context's event loop. https://html.spec.whatwg.org/#navigating-auxiliary-browsing-contexts-in-the-dom used the current as well.
But I agree the use of the current here can be ambiguous as we don't have a definition for the current browsing context. And we have a clearer definition, the [=WindowClient/browsing context=]. I'll change them using the [=WindowClient/browsing context=].
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.
Done.
This change adds Client.frameType back with the reasons:
This change also improved the steps of the algorithms that Create Window Client
invokes by removing unnecessary parallel steps.
Fixes: #732.
Preview | Diff