jussi-kalliokoski / webmidi-issues

A test repo for importing the issues from bugzilla
0 stars 0 forks source link

MIDIInput and MIDIOutput should inherit from MIDIPort, which should not be an interface #24

Closed jussi-kalliokoski closed 11 years ago

jussi-kalliokoski commented 11 years ago

Originally reported on W3C Bugzilla ISSUE-20381 Thu, 13 Dec 2012 19:20:54 GMT Reported by Chris Wilson Assigned to Chris Wilson

From Marcos:

It would be better if you could fold everything into MIDIPort and get rid of MIDIOutput and MIDIInput? you already have the port type, and you can just say that sending() does nothing when a port is not outputting.

If you don't agree, then I think MIDIInput and MIDIOutput need to inherit from MIDIPort (not implement the interface). Implementing the interface makes a huge mess when actually implementing, as the stuff from MIDIPort has to be copied over from MIDIPort.

So, worst case, please change the spec to match the following pattern:

interface MIDIOutput : MIDIPort { } interface MIDIInput : MIDIPort { } MIDIPort : EventTarget{ }

However, I strongly urge you to do away with MIDIInput and MIDIOutput. They are redundant, IMHO.

jussi-kalliokoski commented 11 years ago

Original comment by Chris Wilson on W3C Bugzilla. Thu, 13 Dec 2012 19:21:37 GMT

I'll restructure. They are not redundant, though - Input and Output ports are very different, and not interchangeable.

jussi-kalliokoski commented 11 years ago

Original comment by Chris Wilson on W3C Bugzilla. Thu, 13 Dec 2012 21:16:31 GMT

Forgot this bit of feedback to roll together:

The following is also incorrect: [TreatNonCallableAsNull] attribute callback? onmessage;

Please change it to: attribute EventHandler onmessage;

Fixed all these issues: https://dvcs.w3.org/hg/audio/rev/477c4b064f31