diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2020-06-01 11:42:39 +0200 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2020-06-29 16:53:47 +0200 |
commit | 84598a517323f47284e34aa328a195ae96c5f8cc (patch) | |
tree | 29cdb08114999db04bcb7e02261f5556d146961c /components/script/dom/webidls | |
parent | 4e6d3e7cec0fa2467bdb7e6dd926facc4c37a28b (diff) | |
download | servo-84598a517323f47284e34aa328a195ae96c5f8cc.tar.gz servo-84598a517323f47284e34aa328a195ae96c5f8cc.zip |
Introduce RTCError and RTCErrorEvent
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r-- | components/script/dom/webidls/RTCError.webidl | 35 | ||||
-rw-r--r-- | components/script/dom/webidls/RTCErrorEvent.webidl | 15 |
2 files changed, 50 insertions, 0 deletions
diff --git a/components/script/dom/webidls/RTCError.webidl b/components/script/dom/webidls/RTCError.webidl new file mode 100644 index 00000000000..01929f0af5a --- /dev/null +++ b/components/script/dom/webidls/RTCError.webidl @@ -0,0 +1,35 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +// https://www.w3.org/TR/webrtc/#dom-rtcerror + +[Exposed=Window] +interface RTCError : DOMException { + constructor(RTCErrorInit init, optional DOMString message = ""); + readonly attribute RTCErrorDetailType errorDetail; + readonly attribute long? sdpLineNumber; + readonly attribute long? httpRequestStatusCode; + readonly attribute long? sctpCauseCode; + readonly attribute unsigned long? receivedAlert; + readonly attribute unsigned long? sentAlert; +}; + +dictionary RTCErrorInit { + required RTCErrorDetailType errorDetail; + long sdpLineNumber; + long httpRequestStatusCode; + long sctpCauseCode; + unsigned long receivedAlert; + unsigned long sentAlert; +}; + +enum RTCErrorDetailType { + "data-channel-failure", + "dtls-failure", + "fingerprint-failure", + "sctp-failure", + "sdp-syntax-error", + "hardware-encoder-not-available", + "hardware-encoder-error" +};
\ No newline at end of file diff --git a/components/script/dom/webidls/RTCErrorEvent.webidl b/components/script/dom/webidls/RTCErrorEvent.webidl new file mode 100644 index 00000000000..1f215d39374 --- /dev/null +++ b/components/script/dom/webidls/RTCErrorEvent.webidl @@ -0,0 +1,15 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + + // https://www.w3.org/TR/webrtc/#rtcerrorevent-interface + +[Exposed=Window] +interface RTCErrorEvent : Event { + constructor(DOMString type, RTCErrorEventInit eventInitDict); + [SameObject] readonly attribute RTCError error; +}; + +dictionary RTCErrorEventInit : EventInit { + required RTCError error; +};
\ No newline at end of file |