这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit 0ec8576

Browse files
author
Raymes Khoury
committed
Add Feature Policy integration for WebMidi
1 parent 543b0fd commit 0ec8576

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,19 @@ <h2>Terminology</h2>
142142
<section>
143143
<h2>Obtaining Access to MIDI Devices</h2>
144144

145+
<section>
146+
<h2>Feature Policy Integration</h2>
147+
<p>
148+
<a data-lt="Navigator.requestMIDIAccess">requestMIDIAccess</a> is a <a data-cite="FEATURE-POLICY#policy-controlled-feature">policy-controlled feature</a>, as defined by <a data-cite="FEATURE-POLICY">Feature Policy</a>.
149+
</p>
150+
<p>
151+
The <a data-cite="FEATURE-POLICY#feature-name">feature name</a> for <a data-lt="Navigator.requestMIDIAccess">requestMIDIAccess</a> is <dfn data-lt="midi-fp" data-lt-noDefault><code>midi</code></dfn>.
152+
</p>
153+
<p>
154+
The <a data-cite="FEATURE-POLICY#default-allowlist">default allowlist</a> for <a data-lt="Navigator.requestMIDIAccess">requestMIDIAccess</a> is <code>["self"]</code>.
155+
</p>
156+
</section>
157+
145158
<section data-dfn-for="Navigator">
146159
<h2>Extensions to the <dfn>Navigator</dfn> interface</h2>
147160

@@ -182,6 +195,14 @@ <h2>Extensions to the <dfn>Navigator</dfn> interface</h2>
182195
<ol>
183196
<li><p>Let <var>promise</var> be a new Promise object and <var>resolver</var> be its associated resolver.</p></li>
184197
<li><p>Return <var>promise</var> and run the following steps asynchronously.</p></li>
198+
<li><p>Let <var>document</var> be the calling context's <a data-cite="!DOM#concept-document">Document</a>.</p></li>
199+
<li>
200+
<p>
201+
If <var>document</var> is not <a data-cite="!HTML#allowed-to-use">allowed to use</a> the
202+
<a data-cite="FEATURE-POLICY#policy-controlled-feature">policy-controlled feature</a> named
203+
<a data-lt="midi-fp" data-lt-noDefault>midi</a>, jump to the step labeled <em>failure</em> below.
204+
</p>
205+
</li>
185206

186207
<li><p>
187208
Optionally, e.g. based on a previously-established user

0 commit comments

Comments
 (0)