- From: Martin Thomson <martin.thomson@gmail.com>
- Date: Wed, 26 Sep 2012 14:18:23 -0700
- To: Randell Jesup <randell-ietf@jesup.org>
- Cc: public-webrtc@w3.org
Section 14 does include some events, but the only linking between those and the classes that generate then is in prose. On 26 September 2012 13:41, Randell Jesup <randell-ietf@jesup.org> wrote: > On 9/26/2012 3:56 PM, Martin Thomson wrote: >> >> None of the event handlers for RTCPeerConnection have specific types >> associated with the event. >> >> This might be OK for the "stuff just happened events": >> attribute EventHandler onnegotationneeded; >> attribute EventHandler onopen; >> >> Each of the following produces an event that includes additional >> attributes: >> attribute EventHandler onicecandidate; >> - candidate : RTCIceCandidate >> attribute EventHandler onstatechange; >> - state : RTCPeerState >> attribute EventHandler onaddstream; >> - stream : MediaStream >> attribute EventHandler onremovestream; >> - stream : MediaStream ? >> attribute EventHandler ongatheringchange; >> - state : RTCGatheringState >> attribute EventHandler onicechange; >> - state : RTCIceState >> attribute EventHandler onidentityresult; >> - assertion : RTCIdentityAssertion >> - verified : boolean > > > > attribute EventHandler ondatachannel; > - channel: DataChannel > > onconnection, onclosedconnection: no params (and poorly named) > > In DataChannel objects: > onopen, onclose: no params > onerror: not defined yet - should try to mirror WebSockets > onmessage: Object (DOMString, Blob or ArrayBuffer) - same as WebSockets > > > >> >> Rather than using the generic EventHandler for each of these events, a >> specific, typed callback function for each these would make >> documentation easier. That callback would take a subclass of Event >> that included the extra attributes. >> >> Obviously, for some of these it could be just a matter of following >> through e.target.iceState or something like that, but others contain >> vital information. It would be nice if this could be more clearly >> documented. >> >> --Martin >> > > > -- > Randell Jesup > randell-ietf@jesup.org > >
Received on Wednesday, 26 September 2012 21:18:51 UTC