WebMIDI API feedback

Hey all,

I was just looking at an extract of the IDL from
http://webaudio.github.io/web-midi-api/ to get a sense for how the APIs
together. A copule of thoughts:

requestMidiAccess can (should?) be re-worked to vend a Future. A cleaned up
interface for it might be:

partial interface Navigator {
    Future requestMIDIAccess (optional boolean
systemExclusiveSupportRequested = false );
};

The naming of "onmessage" and "send" also seem odd. We have "onmessage" for
receivers of postMessage()-sent data. I'm not suggesting overloading
"postMessage", but perhaps "ondata" might be less confusing to developers
who see/use both?

In 6.2, I see methods called "getInputs", and "getOutputs" which don't take
any parameters. Is there a reason these aren't getters, which would allow
you to drop the "get" prefix and avoid the camel-casing entirely?

There don't appear to be constructors for your Event subtypes. This is
clearly a bug. All new interfaces for which you can be vended concrete
instances should come with constructors defined.

Lastly, are y'all looking at the ES6 binary data proposal? Just want to
make sure we're not doing anything there that's going to make life hard for
your API assumptions:
http://wiki.ecmascript.org/doku.php?id=harmony:binary_data

Thanks.

Received on Friday, 19 April 2013 15:32:27 UTC