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

Add RTCPeerConnection constructor error to spec. #197

Merged
merged 3 commits into from
Nov 8, 2024
Merged
Changes from 2 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
37 changes: 37 additions & 0 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2474,6 +2474,25 @@ nested traversables in [[HTML]]'s <a
href=https://html.spec.whatwg.org/multipage/document-sequences.html#top-level-traversables>Top-level
traversables</a> section.

<div algorithm>
To get the <dfn for=navigable>fenced navigable ancestor</dfn> of a [=navigable=] |navigable|:

1. Let |currentNavigable| be |navigable|.

1. While |currentNavigable| is not null:

1. If |currentNavigable| is a [=fenced navigable container/fenced navigable=], return
|currentNavigable|.

1. Set |currentNavigable| to |currentNavigable|'s [=navigable/parent=].

1. Return |currentNavigable|.

Note: Some Web Platform algorithms will have additional restrictions if the
[=relevant global object=]'s [=Window/navigable=] has a [=navigable/fenced navigable ancestor=].
For an example, see the [[#webrtc-monkeypatch]] section below.
</div>

<h4 id=top-level-traversables>Top-level traversables</h4>

The [[HTML]] Standard currently defines a [=top-level traversable=] as a [=traversable navigable=]
Expand Down Expand Up @@ -3918,6 +3937,24 @@ at the expense of some utility.
</wpt>
</div>

<h3 id=webrtc-monkeypatch>WebRTC</h3>

The [[WEBRTC]] specification defines "ECMAScript APIs in WebIDL to allow media and generic
application data to be sent to and received from another browser or device implementing the
appropriate set of real-time protocols." The interface which facilitates connections to peers
is {{RTCPeerConnection}}. Construction of this interface, and therefore connection to peers
via WebRTC, is disallowed in fenced frames.

<div algorithm=webrtc-constructor>
Modify the {{RTCPeerConnection}} {{RTCPeerConnection/constructor}} algorithm to add new first and
second steps that read:

1. Let |navigable| be [=this=]'s [=relevant global object=]'s [=Window/navigable=].

1. If |navigable| has a [=navigable/fenced navigable ancestor=], throw a {{NotAllowedError}}
{{DOMException}}.
</div>

<h2 id=security-and-privacy>Security & Privacy Considerations</h2>

This material is being upstreamed from our explainer into this specification, and in the meantime
Expand Down
Loading