You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,19 @@ <h2>Terminology</h2>
142
142
<section>
143
143
<h2>Obtaining Access to MIDI Devices</h2>
144
144
145
+
<section>
146
+
<h2>Feature Policy Integration</h2>
147
+
<p>
148
+
<adata-lt="Navigator.requestMIDIAccess">requestMIDIAccess</a> is a <adata-cite="FEATURE-POLICY#policy-controlled-feature">policy-controlled feature</a>, as defined by <adata-cite="FEATURE-POLICY">Feature Policy</a>.
149
+
</p>
150
+
<p>
151
+
The <adata-cite="FEATURE-POLICY#feature-name">feature name</a> for <adata-lt="Navigator.requestMIDIAccess">requestMIDIAccess</a> is <dfndata-lt="midi-fp" data-lt-noDefault><code>midi</code></dfn>.
152
+
</p>
153
+
<p>
154
+
The <adata-cite="FEATURE-POLICY#default-allowlist">default allowlist</a> for <adata-lt="Navigator.requestMIDIAccess">requestMIDIAccess</a> is <code>["self"]</code>.
155
+
</p>
156
+
</section>
157
+
145
158
<sectiondata-dfn-for="Navigator">
146
159
<h2>Extensions to the <dfn>Navigator</dfn> interface</h2>
147
160
@@ -182,6 +195,14 @@ <h2>Extensions to the <dfn>Navigator</dfn> interface</h2>
182
195
<ol>
183
196
<li><p>Let <var>promise</var> be a new Promise object and <var>resolver</var> be its associated resolver.</p></li>
184
197
<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 <adata-cite="!DOM#concept-document">Document</a>.</p></li>
199
+
<li>
200
+
<p>
201
+
If <var>document</var> is not <adata-cite="!HTML#allowed-to-use">allowed to use</a> the
202
+
<adata-cite="FEATURE-POLICY#policy-controlled-feature">policy-controlled feature</a> named
203
+
<adata-lt="midi-fp" data-lt-noDefault>midi</a>, jump to the step labeled <em>failure</em> below.
204
+
</p>
205
+
</li>
185
206
186
207
<li><p>
187
208
Optionally, e.g. based on a previously-established user
@@ -221,7 +242,7 @@ <h2>Extensions to the <dfn>Navigator</dfn> interface</h2>
221
242
222
243
<li><p><em><b>failure</b></em>: Let <var>error</var> be a new <a>DOMException</a>.
223
244
This exception's .name should be <code>"SecurityError"</code> if the
224
-
user or their security settings denied the application from creating a MIDIAccess instance with the requested options, <code>"AbortError"</code> if the page is going to be closed for a user navigation, <code>"InvalidStateError"</code> if the underlying systems raise any errors, or otherwise it should be <code>"NotSupportedError"</code>.</p></li>
245
+
user or their security settings denied the application from creating a MIDIAccess instance with the requested options, or if the error is the result of <var>document</var> not being <adata-cite="!HTML#allowed-to-use">allowed to use</a> the feature, <code>"AbortError"</code> if the page is going to be closed for a user navigation, <code>"InvalidStateError"</code> if the underlying systems raise any errors, or otherwise it should be <code>"NotSupportedError"</code>.</p></li>
225
246
<li><p>Call <var>resolver</var>'s <code>reject(value)</code> method with <var>error</var> as value argument.</p></li>
0 commit comments