[webrtc-pc] RTCDataChannel close event not defined

aboba has just created a new issue for 
https://github.com/w3c/webrtc-pc:

== RTCDataChannel close event not defined ==
The specification does not define the RTCDataChannel close event.  If 
it is intended to be modeled after websockets, it would look like 
this: 

[Constructor(DOMString type, optional CloseEventInit eventInitDict)]
interface CloseEvent : Event {
  readonly attribute boolean wasClean;
  readonly attribute unsigned short code;
  readonly attribute USVString reason;
};

dictionary CloseEventInit : EventInit {
  boolean wasClean = false;
  unsigned short code = 0;
  USVString reason = "";
};

The wasClean attribute must return the value it was initialized to. It
 represents whether the datachannel closed cleanly or not.

The code attribute must return the value it was initialized to. It 
represents the datachannel close code provided.

The reason attribute must return the value it was initialized to. It 
represents the datachannel connection close reason provided.

Please view or discuss this issue at 
https://github.com/w3c/webrtc-pc/issues/1009 using your GitHub account

Received on Monday, 30 January 2017 01:14:32 UTC