[Bug 20512] MIDIEvent lacking constructor

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

--- Comment #6 from Chris Wilson <cwilso@gmail.com> ---
(In reply to comment #5)
> (In reply to comment #4) 
> > Marcos' "primarily for testing, firing synthetic events" is a justifiable
> > reason, I suppose; however, I'm not sure I see how this is done in other
> > specs.  Is there a TouchEvent constructor somewhere?
> 
> The TouchEvent spec is not a good guide as it lacks a link to UIEvent (maybe
> that spec has not been well reviewed, but not sure). 
> 
> I recommend looking at the new DOM UI Events spec... there is a whole
> section on constructors for events (the spec is currently not loading well
> in Chrome, so use FF or something else to view it):
> 
> https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
> 
> As an aside, the Event interface, from which MIDIEvent inherits, has a
> constructor. But I'm having trouble finding in WebIDL what it means to
> inherit from an interface that has a constructor on it.

I would think this would be symmetric with UI Events - so the answer to "how do
I synthesize a MIDIEvent" would be:

var event = new Event("message", {data: [...], timestamp: t });

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

Received on Tuesday, 8 January 2013 19:26:58 UTC