MIDIMessageEventInit and MIDIConnectionEventInit members should be required #168
Labels
class: substantive
https://www.w3.org/policies/process/#correction-classes
status: ready for editing
Enough information should be available to implement this change in the spec
Milestone
http://webaudio.github.io/web-midi-api/#MIDIMessageEvent
http://webaudio.github.io/web-midi-api/#MIDIConnectionEvent
Currently, the init dicts for the event constructors are optional, so
new MIDIConnectionEvent('type')
should work per spec. But theport
attribute then couldn't be anything other than null, and yet it's not nullable.The way to fix this is to make the init dicts non-optional and to make the members required, e.g.:
The only other option is to make the
port
attribute nullable, which would be silly.The text was updated successfully, but these errors were encountered: