[Bug 20505] merge getInput, getOutput -> getPort() or getPortById()

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20505

Chris Wilson <cwilso@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cwilso@gmail.com

--- Comment #1 from Chris Wilson <cwilso@gmail.com> ---
1) The separation between these is because they are, in fact, two different
lists (inputs and outputs), and they're fundamentally different objects; one
can only read, one can only write.  Merging these entirely will, I think, tend
to be confusing, as output ports will have an onmessage handler, and input
ports will have a send() method, even though they are orphans that don't do
anything.  I'm not very comfortable with that, as I think the guard rails
(guide rails?) of having the methods only where appropriate is good.

On why there are three methods to get an input/output - personally, I'd ditch
the MIDIPort version, but I do want to keep the index version, as (if you look
at most of my demos), it's fairly common to show a dropdown to select ports,
and index is an easy way to do that.  No, it won't persist over sessions, but
it doesn't need to.  In fact, if you were persisting over sessions, I'd expect
an app to pop "pick your port" dialog that is index-based, and then persist the
ID.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 25 December 2012 23:20:36 UTC