Skip to content
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
23 changes: 22 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@ <h2>Terminology</h2>
<section>
<h2>Obtaining Access to MIDI Devices</h2>

<section>
<h2>Feature Policy Integration</h2>
<p>
<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>.
</p>
<p>
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>.
</p>
<p>
The <a data-cite="FEATURE-POLICY#default-allowlist">default allowlist</a> for <a data-lt="Navigator.requestMIDIAccess">requestMIDIAccess</a> is <code>["self"]</code>.
</p>
</section>

<section data-dfn-for="Navigator">
<h2>Extensions to the <dfn>Navigator</dfn> interface</h2>

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

<li><p>
Optionally, e.g. based on a previously-established user
Expand Down Expand Up @@ -221,7 +242,7 @@ <h2>Extensions to the <dfn>Navigator</dfn> interface</h2>

<li><p><em><b>failure</b></em>: Let <var>error</var> be a new <a>DOMException</a>.
This exception's .name should be <code>"SecurityError"</code> if the
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>
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 <a data-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>
<li><p>Call <var>resolver</var>'s <code>reject(value)</code> method with <var>error</var> as value argument.</p></li>
</ol>

Expand Down