Skip to content

Commit

Permalink
Add RtcPeerConnectionIceErrorEvent WebAPI (#3835)
Browse files Browse the repository at this point in the history
  • Loading branch information
evdokimovs authored Feb 8, 2024
1 parent 1f12124 commit e9cb333
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# `wasm-bindgen` Change Log
--------------------------------------------------------------------------------

## Unreleased

### Added

* Add bindings for `RTCPeerConnectionIceErrorEvent`.
[#3835](https://github.com/rustwasm/wasm-bindgen/pull/3835)

--------------------------------------------------------------------------------

## [0.2.91](https://github.com/rustwasm/wasm-bindgen/compare/0.2.90...0.2.91)

Released 2024-02-06
Expand Down Expand Up @@ -56,6 +65,8 @@ Released 2024-02-06
* Fixed nighly build of `wasm-bindgen-futures`.
[#3827](https://github.com/rustwasm/wasm-bindgen/pull/3827)

--------------------------------------------------------------------------------

## [0.2.90](https://github.com/rustwasm/wasm-bindgen/compare/0.2.89...0.2.90)

Released 2024-01-06
Expand Down Expand Up @@ -98,6 +109,8 @@ Released 2024-01-06
`RtcLifecycleEvent` and `WebrtcGlobalStatisticsReport` features.
[#3723](https://github.com/rustwasm/wasm-bindgen/pull/3723)

--------------------------------------------------------------------------------

## [0.2.89](https://github.com/rustwasm/wasm-bindgen/compare/0.2.88...0.2.89)

Released 2023-11-27.
Expand Down Expand Up @@ -126,6 +139,8 @@ Released 2023-11-27.
* Removed Gecko-internal dictionary bindings `Csp`, `CspPolicies`, `CspReport` and `CspReportProperties`.
[#3721](https://github.com/rustwasm/wasm-bindgen/pull/3721)

--------------------------------------------------------------------------------

## [0.2.88](https://github.com/rustwasm/wasm-bindgen/compare/0.2.87...0.2.88)

Released 2023-11-01
Expand Down Expand Up @@ -290,6 +305,8 @@ Released 2023-11-01
* Removed `GetNotificationOptions`, `NotificationBehavior` and `Notification.get()` because
they don't exist anymore.

--------------------------------------------------------------------------------

## [0.2.87](https://github.com/rustwasm/wasm-bindgen/compare/0.2.86...0.2.87)

Released 2023-06-12.
Expand Down
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;
};

0 comments on commit e9cb333

Please sign in to comment.