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

Push subscriptions are not associated with service workers #388

Merged
merged 1 commit into from
Sep 3, 2024
Merged
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
14 changes: 5 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -626,22 +626,18 @@ <h3>
global task=] on the [=networking task source=] using |global| to [=reject=] |promise| with
an {{"InvalidStateError"}} {{DOMException}} and terminate these steps.
</li>
<li>Let |sw| be |registration|'s [=service worker registration/active worker=].
</li>
<li>Let |permission| be [=request permission to use=] "push".
</li>
<li>If |permission| is {{PermissionState/"denied"}}, [=queue a global task=] on the [=user
interaction task source=] using |global| to [=reject=] |promise| with a
{{"NotAllowedError"}} {{DOMException}} and terminate these steps.
</li>
<li>If |sw| is already subscribed, run the following sub-steps:
<li>If |registration| has a <a>push subscription</a>:
<ol>
<li>Try to retrieve the <a>push subscription</a> associated with the |sw|. If there is
an error, [=queue a global task=] on the [=networking task source=] using |global| to
[=reject=] |promise| with an {{"AbortError"}} {{DOMException}} and terminate these
steps.
</li>
<li>Let |subscription| be the <a>push subscription</a> associated with |sw|.
<li>Let |subscription| be the result of obtaining |registration|'s <a>push
subscription</a>. If there is an error, [=queue a global task=] on the [=networking
task source=] using |global| to [=reject=] |promise| with an {{"AbortError"}}
{{DOMException}} and terminate these steps.
</li>
<li>Compare the |options| argument with the `options` attribute of |subscription|. The
contents of {{BufferSource}} values are compared for equality rather than
Expand Down
Loading