Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RtcPeerConnectionIceErrorEvent WebAPI #3835

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/web-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ RtcOfferAnswerOptions = []
RtcOfferOptions = []
RtcOutboundRtpStreamStats = []
RtcPeerConnection = ["EventTarget"]
RtcPeerConnectionIceErrorEvent = ["Event"]
RtcPeerConnectionIceEvent = ["Event"]
RtcPeerConnectionIceEventInit = []
RtcPeerConnectionState = []
Expand Down
50 changes: 50 additions & 0 deletions crates/web-sys/src/features/gen_RtcPeerConnectionIceErrorEvent.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = RTCPeerConnectionIceErrorEvent , typescript_type = "RTCPeerConnectionIceErrorEvent")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcPeerConnectionIceErrorEvent` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
pub type RtcPeerConnectionIceErrorEvent;
# [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = address)]
#[doc = "Getter for the `address` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/address)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
pub fn address(this: &RtcPeerConnectionIceErrorEvent) -> Option<String>;
# [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = port)]
#[doc = "Getter for the `port` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/port)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
pub fn port(this: &RtcPeerConnectionIceErrorEvent) -> Option<u16>;
# [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = url)]
#[doc = "Getter for the `url` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/url)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
pub fn url(this: &RtcPeerConnectionIceErrorEvent) -> String;
# [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = errorCode)]
#[doc = "Getter for the `errorCode` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/errorCode)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
pub fn error_code(this: &RtcPeerConnectionIceErrorEvent) -> u16;
# [wasm_bindgen (structural , method , getter , js_class = "RTCPeerConnectionIceErrorEvent" , js_name = errorText)]
#[doc = "Getter for the `errorText` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnectionIceErrorEvent/errorText)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceErrorEvent`*"]
pub fn error_text(this: &RtcPeerConnectionIceErrorEvent) -> String;
}
7 changes: 7 additions & 0 deletions crates/web-sys/src/features/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7495,6 +7495,13 @@ mod gen_RtcPeerConnection;
#[allow(unused_imports)]
pub use gen_RtcPeerConnection::*;

#[cfg(feature = "RtcPeerConnectionIceErrorEvent")]
#[allow(non_snake_case)]
mod gen_RtcPeerConnectionIceErrorEvent;
#[cfg(feature = "RtcPeerConnectionIceErrorEvent")]
#[allow(unused_imports)]
pub use gen_RtcPeerConnectionIceErrorEvent::*;

#[cfg(feature = "RtcPeerConnectionIceEvent")]
#[allow(non_snake_case)]
mod gen_RtcPeerConnectionIceEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectioniceerrorevent
*/

[Exposed=Window]
interface RTCPeerConnectionIceErrorEvent : Event {
constructor(DOMString type, RTCPeerConnectionIceErrorEventInit eventInitDict);
readonly attribute DOMString? address;
readonly attribute unsigned short? port;
readonly attribute DOMString url;
readonly attribute unsigned short errorCode;
readonly attribute USVString errorText;
};
Loading