Index: modules/webmidi/MIDIPort.idl |
diff --git a/modules/webmidi/MIDIPort.idl b/modules/webmidi/MIDIPort.idl |
index 902c825502541607f5a8e5079c002e7a344a142f..726fd01a31fd46021ee261f946aff5eb3f706d0e 100644 |
--- a/modules/webmidi/MIDIPort.idl |
+++ b/modules/webmidi/MIDIPort.idl |
@@ -28,20 +28,36 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
+enum MIDIPortConnectionState { |
+ "open", |
+ "closed", |
+ "pending" |
+}; |
+ |
+enum MIDIPortDeviceState { |
+ "disconnected", |
+ "connected" |
+}; |
+ |
enum MIDIPortType { |
"input", |
"output" |
}; |
[ |
- NoInterfaceObject, |
- GarbageCollected |
+ ActiveDOMObject, |
+ GarbageCollected, |
] interface MIDIPort : EventTarget { |
+ readonly attribute MIDIPortConnectionState connection; |
readonly attribute DOMString id; |
readonly attribute DOMString manufacturer; |
readonly attribute DOMString name; |
+ readonly attribute MIDIPortDeviceState state; |
readonly attribute MIDIPortType type; |
readonly attribute DOMString version; |
- attribute EventHandler ondisconnect; |
+ attribute EventHandler onstatechange; |
+ |
+ [CallWith=ScriptState] Promise open(); |
+ [CallWith=ScriptState] Promise close(); |
}; |