Skip to content

Commit a210654

Browse files
feat: add RTCDataChannel id (#3547)
1 parent bb2f424 commit a210654

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/web-sys/src/features/gen_RtcDataChannel.rs

+7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ extern "C" {
1919
#[doc = ""]
2020
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
2121
pub fn label(this: &RtcDataChannel) -> String;
22+
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = id)]
23+
#[doc = "Getter for the `id` field of this object."]
24+
#[doc = ""]
25+
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/id)"]
26+
#[doc = ""]
27+
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
28+
pub fn id(this: &RtcDataChannel) -> Option<u16>;
2229
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = reliable)]
2330
#[doc = "Getter for the `reliable` field of this object."]
2431
#[doc = ""]

crates/web-sys/webidls/enabled/RTCDataChannel.webidl

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ enum RTCDataChannelType {
1717
interface RTCDataChannel : EventTarget
1818
{
1919
readonly attribute DOMString label;
20+
readonly attribute unsigned short? id;
2021
readonly attribute boolean reliable;
2122
readonly attribute unsigned short? maxPacketLifeTime;
2223
readonly attribute unsigned short? maxRetransmits;

0 commit comments

Comments
 (0)