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

Update BFCache interaction #503

Merged
merged 1 commit into from
May 23, 2023
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
26 changes: 12 additions & 14 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1092,20 +1092,18 @@ run these steps:

## Context cleanup steps ## {#web-transport-context-cleanup-steps}

This specification defines [=unloading document cleanup steps=] as the following steps, given a
{{Document}} document:

1. Let |window| be |document|'s [=relevant global object=].
1. For each {{WebTransport}} |transport| whose [=relevant global object=] is |window|:
1. If |transport|.{{[[State]]}} is `"connected"`, then:
1. Set |transport|.{{[[State]]}} to `"failed"`.
1. [=In parallel=], [=session/terminate=] |transport|.{{[[Session]]}}.
1. [=Queue a network task=] with |transport| to run the following steps:
1. Let |error| be a newly [=DOMException/created=] {{WebTransportError}} whose
{{WebTransportErrorOptions/source}} is `"session"`.
1. [=Cleanup=] |transport| with |error|.
1. If |transport|.{{[[State]]}} is `"connecting"`, set |transport|.{{[[State]]}} to
`"failed"`.
This specification defines <dfn>context cleanup steps</dfn> as the following steps, given
{{WebTransport}} |transport|:

1. If |transport|.{{[[State]]}} is `"connected"`, then:
1. Set |transport|.{{[[State]]}} to `"failed"`.
1. [=In parallel=], [=session/terminate=] |transport|.{{[[Session]]}}.
1. [=Queue a network task=] with |transport| to run the following steps:
1. Let |error| be a newly [=DOMException/created=] {{WebTransportError}} whose
{{WebTransportErrorOptions/source}} is `"session"`.
1. [=Cleanup=] |transport| with |error|.
1. If |transport|.{{[[State]]}} is `"connecting"`, set |transport|.{{[[State]]}} to
`"failed"`.

Issue: This needs to be done in workers too. See
<a href="https://www.github.com/w3c/webtransport/issues/127">#127</a> and
Expand Down