Proposal for PeerConnection.onfatalerror and .onwarning (PR 292)

I made a strawman proposal for what we were calling PeerConnection.onerror:
 https://github.com/w3c/webrtc-pc/pull/292

Here's the gist of it:

partial interface PeerConnection {
  // The PeerConnection can't continue.
  attribute EventHandler onfatalerror;
  // The PeerConnection can continue.
  attribute EventHandler onwarning;
}


And here's how it could be used:

pc.onwarning = function(evt) {
  console.log(evt.message);
}
pc.onfatalerror = function(evt) {
  console.log(evt.message);
  goToBrokedUI();
}

Received on Saturday, 5 September 2015 01:58:29 UTC