W3C home > Mailing lists > Public > public-webrtc@w3.org > September 2015

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

From: Peter Thatcher <pthatcher@google.com>
Date: Fri, 4 Sep 2015 18:57:21 -0700
Message-ID: <CAJrXDUEXibMt58oMSYhV8qgLXY20W=v-m0fToVF7r6Xhy4Hs=A@mail.gmail.com>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:46 UTC