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

Clean up Clients interface methods #1332

Merged
merged 2 commits into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1181,12 +1181,9 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Run the following steps [=in parallel=]:
1. Let |targetClients| be a new [=list=].
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the [=same origin|same=] as the associated [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1. If |client| is an [=environment settings object=], then:
1. If |client| is not a [=secure context=], [=continue=].
1. Else:
1. If |client|’s [=creation URL=] is not a [=potentially trustworthy URL=], [=continue=].
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1. If |client| is not a [=secure context=], [=continue=].
1. If |options|["{{ClientQueryOptions/includeUncontrolled}}"] is false, and if |client|'s [=active service worker=] is not the associated [=ServiceWorkerGlobalScope/service worker=], [=continue=].
1. If |client|'s [=environment/execution ready flag=] is unset, [=continue=].
1. Add |client| to |targetClients|.
1. Let |matchedWindowData| be a new [=list=].
1. Let |matchedClients| be a new [=list=].
Expand Down Expand Up @@ -1266,12 +1263,10 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |promise| be a new <a>promise</a>.
1. Run the following substeps <a>in parallel</a>:
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the <a lt="same origin">same</a> as the [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1. If |client| is an [=environment settings object=], then:
1. If |client| is not a <a>secure context</a>, continue to the next iteration of the loop.
1. Else:
1. If |client|’s <a>creation URL</a> is not a <a>potentially trustworthy URL</a>, continue to the next iteration of the loop.
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1. If |client| is not a [=secure context=], [=continue=].
1. Let |registration| be the result of running <a>Match Service Worker Registration</a> algorithm passing |client|'s <a>creation URL</a> as the argument.
1. If |registration| is not the [=ServiceWorkerGlobalScope/service worker=]'s <a>containing service worker registration</a>, continue to the next iteration of the loop.
1. If |registration| is not the [=ServiceWorkerGlobalScope/service worker=]'s <a>containing service worker registration</a>, [=continue=].
1. If |client|'s <a>active service worker</a> is not the [=ServiceWorkerGlobalScope/service worker=], then:
1. Invoke <a>Handle Service Worker Client Unload</a> with |client| as the argument.
1. Set |client|'s <a>active service worker</a> to [=ServiceWorkerGlobalScope/service worker=].
Expand Down
15 changes: 5 additions & 10 deletions docs/v1/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,12 +1119,9 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Run the following steps [=in parallel=]:
1. Let |targetClients| be a new [=list=].
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the [=same origin|same=] as the associated [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1. If |client| is an [=environment settings object=], then:
1. If |client| is not a [=secure context=], [=continue=].
1. Else:
1. If |client|’s [=creation URL=] is not a [=potentially trustworthy URL=], [=continue=].
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1. If |client| is not a [=secure context=], [=continue=].
1. If |options|["{{ClientQueryOptions/includeUncontrolled}}"] is false, and if |client|'s [=active service worker=] is not the associated [=ServiceWorkerGlobalScope/service worker=], [=continue=].
1. If |client|'s [=environment/execution ready flag=] is unset, [=continue=].
1. Add |client| to |targetClients|.
1. Let |matchedWindowData| be a new [=list=].
1. Let |matchedClients| be a new [=list=].
Expand Down Expand Up @@ -1204,12 +1201,10 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |promise| be a new <a>promise</a>.
1. Run the following substeps <a>in parallel</a>:
1. For each [=/service worker client=] |client| whose [=service worker client/origin=] is the <a lt="same origin">same</a> as the [=ServiceWorkerGlobalScope/service worker=]'s [=environment settings object/origin=]:
1. If |client| is an [=environment settings object=], then:
1. If |client| is not a <a>secure context</a>, continue to the next iteration of the loop.
1. Else:
1. If |client|’s <a>creation URL</a> is not a <a>potentially trustworthy URL</a>, continue to the next iteration of the loop.
1. If |client|'s [=environment/execution ready flag=] is unset or |client|'s [=discarded flag=] is set, [=continue=].
1. If |client| is not a [=secure context=], [=continue=].
1. Let |registration| be the result of running <a>Match Service Worker Registration</a> algorithm passing |client|'s <a>creation URL</a> as the argument.
1. If |registration| is not the [=ServiceWorkerGlobalScope/service worker=]'s <a>containing service worker registration</a>, continue to the next iteration of the loop.
1. If |registration| is not the [=ServiceWorkerGlobalScope/service worker=]'s <a>containing service worker registration</a>, [=continue=].
1. If |client|'s <a>active service worker</a> is not the [=ServiceWorkerGlobalScope/service worker=], then:
1. Invoke <a>Handle Service Worker Client Unload</a> with |client| as the argument.
1. Set |client|'s <a>active service worker</a> to [=ServiceWorkerGlobalScope/service worker=].
Expand Down