W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2012

[Bug 20502] MIDIEvent should have a port attribute

From: <bugzilla@jessica.w3.org>
Date: Tue, 25 Dec 2012 22:55:45 +0000
To: public-audio@w3.org
Message-ID: <bug-20502-5429-cbGemacR8b@http.www.w3.org/Bugs/Public/>

--- Comment #6 from Chris Wilson <cwilso@gmail.com> ---
(In reply to comment #5)
> > "Can't you easily set this up by binding the message handler (onmessage or
> > addEventHandler function)?"  Binding is on the function object, irrelevant
> > of onmessage or addEventHandler.
> Maybe I'm not getting what you mean here. Are you literally saying use
> .bind()? Or something else? 

Yes, calling .bind.

port.addEventListener( "message", myhandler.bind( myobj ) );

> Oh, my example was supposed to be all bad - I'll see if I can come up with a
> real usage scenario as I just made that on up on the spot. In any case, I
> think we might be misunderstanding each other, but I can understand the need
> for a good justification to adding this. 
> I might need a stronger use case. At the moment, this might just fall into
> the "nice to have" category. 

I'm not fundamentally opposed, just want to ensure we have strong

> I'll also be honest: I didn't know that "this" would become the port itself
> before Jussi mentioned it. It makes sense, but I wonder if many developers
> know about that.

Hmm, noted.  Have to fix that in my shim, I think.

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 25 December 2012 22:55:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:15 UTC