Re: [w3c/ServiceWorker] Add Client.frameType back (#1329)

jungkees commented on this pull request.



> -        1. Run these substeps <a>in parallel</a>:
-            1. Let |browsingContext| be the <a>context object</a>'s associated [=Client/service worker client=]'s [=environment settings object/global object=]'s [=/browsing context=].
-            1. Let |visibilityState| be null.
-            1. Let |focusState| be false.
-            1. Let |ancestorOriginsList| be the empty list.
-            1. <a>Queue a task</a> |task| to run the following substeps on the <a>context object</a>'s associated [=Client/service worker client=]'s <a>responsible event loop</a> using the <a>user interaction task source</a>:
-                1. Run the <a>focusing steps</a> with |browsingContext|.
-                1. Set |visibilityState| to |browsingContext|'s <a>active document</a>'s {{Document/visibilityState}} attribute value.
-                1. Set |focusState| to the result of running the <a>has focus steps</a> with |browsingContext|'s <a>active document</a> as the argument.
-                1. Set |ancestorOriginsList| to |browsingContext|'s <a>active document</a>'s <a>relevant global object</a>'s {{Location}} object's [=Location/ancestor origins list=]'s associated list.
-            1. Wait for |task| to have executed.
-            1. Let |windowClient| be the result of running <a>Create Window Client</a> algorithm with the <a>context object</a>'s associated [=Client/service worker client=], |visibilityState|, |focusState|, and |ancestorOriginsList| as the arguments.
-            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=].

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=].

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1329#discussion_r198014978

Received on Tuesday, 26 June 2018 05:09:25 UTC