From 4b5f6c6bcb4e421b8b5ba3be068a37d4692c51e5 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Mon, 16 Oct 2023 17:42:57 -0700 Subject: [PATCH 1/2] Make MIDIAccess transferable and exposed to workers --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index d7beef1..f493e84 100644 --- a/index.html +++ b/index.html @@ -488,7 +488,7 @@

devices, and obtain access to an individual device.

-        [SecureContext, Exposed=Window] interface MIDIAccess: EventTarget {
+        [SecureContext, Exposed=(Window,Worker), Transferable] interface MIDIAccess: EventTarget {
           readonly attribute MIDIInputMap inputs;
           readonly attribute MIDIOutputMap outputs;
           attribute EventHandler onstatechange;

From 32a4224973ff02f1b4ce1f461371d2f2b622d9ce Mon Sep 17 00:00:00 2001
From: Michael Wilson 
Date: Tue, 17 Oct 2023 13:52:37 -0700
Subject: [PATCH 2/2] Expose all interfaces

---
 index.html | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/index.html b/index.html
index f493e84..d767d7c 100644
--- a/index.html
+++ b/index.html
@@ -416,7 +416,7 @@ 

MIDIInputMap Interface

-          [SecureContext, Exposed=Window] interface MIDIInputMap {
+          [SecureContext, Exposed=(Window,Worker)] interface MIDIInputMap {
             readonly maplike <DOMString, MIDIInput>;
           };
         
@@ -450,7 +450,7 @@

MIDIOutputMap Interface

-          [SecureContext, Exposed=Window] interface MIDIOutputMap {
+          [SecureContext, Exposed=(Window,Worker)] interface MIDIOutputMap {
             readonly maplike <DOMString, MIDIOutput>;
           };
         
@@ -559,7 +559,7 @@

This interface represents a MIDI input or output port.

-        [SecureContext, Exposed=Window] interface MIDIPort: EventTarget {
+        [SecureContext, Exposed=(Window,Worker)] interface MIDIPort: EventTarget {
           readonly attribute DOMString id;
           readonly attribute DOMString? manufacturer;
           readonly attribute DOMString? name;
@@ -944,7 +944,7 @@ 

MIDIInput Interface

-          [SecureContext, Exposed=Window] interface MIDIInput: MIDIPort {
+          [SecureContext, Exposed=(Window,Worker)] interface MIDIInput: MIDIPort {
             attribute EventHandler onmidimessage;
           };
         
@@ -1008,7 +1008,7 @@

MIDIOutput Interface

-          [SecureContext, Exposed=Window] interface MIDIOutput : MIDIPort {
+          [SecureContext, Exposed=(Window,Worker)] interface MIDIOutput : MIDIPort {
             undefined send(sequence<octet> data, optional DOMHighResTimeStamp timestamp = 0);
             undefined clear();
           };
@@ -1202,7 +1202,7 @@ 

high-resolution time of when the event was received or is to be sent.

-        [SecureContext, Exposed=Window]
+        [SecureContext, Exposed=(Window,Worker)]
         interface MIDIMessageEvent : Event {
           constructor(DOMString type, optional MIDIMessageEventInit eventInitDict = {});
           readonly attribute Uint8Array? data;
@@ -1277,7 +1277,7 @@ 

heavy reliance on connection events not be used.

-        [SecureContext, Exposed=Window]
+        [SecureContext, Exposed=(Window,Worker)]
         interface MIDIConnectionEvent : Event {
           constructor(DOMString type, optional MIDIConnectionEventInit eventInitDict = {});
           readonly attribute MIDIPort? port;