diff --git a/index.html b/index.html index 920259f..3cda7c1 100644 --- a/index.html +++ b/index.html @@ -142,6 +142,19 @@

Terminology

Obtaining Access to MIDI Devices

+
+

Feature Policy Integration

+

+ requestMIDIAccess is a policy-controlled feature, as defined by Feature Policy. +

+

+ The feature name for requestMIDIAccess is midi. +

+

+ The default allowlist for requestMIDIAccess is ["self"]. +

+
+

Extensions to the Navigator interface

@@ -182,6 +195,14 @@

Extensions to the Navigator interface

  1. Let promise be a new Promise object and resolver be its associated resolver.

  2. Return promise and run the following steps asynchronously.

  3. +
  4. Let document be the calling context's Document.

  5. +
  6. +

    + If document is not allowed to use the + policy-controlled feature named + midi, jump to the step labeled failure below. +

    +
  7. Optionally, e.g. based on a previously-established user @@ -221,7 +242,7 @@

    Extensions to the Navigator interface

  8. failure: Let error be a new DOMException. This exception's .name should be "SecurityError" if the - user or their security settings denied the application from creating a MIDIAccess instance with the requested options, "AbortError" if the page is going to be closed for a user navigation, "InvalidStateError" if the underlying systems raise any errors, or otherwise it should be "NotSupportedError".

  9. + 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 document not being allowed to use the feature, "AbortError" if the page is going to be closed for a user navigation, "InvalidStateError" if the underlying systems raise any errors, or otherwise it should be "NotSupportedError".

  10. Call resolver's reject(value) method with error as value argument.