A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannelEvent/RTCDataChannelEvent below:

RTCDataChannelEvent: RTCDataChannelEvent() constructor - Web APIs

RTCDataChannelEvent: RTCDataChannelEvent() constructor

Baseline Widely available

The RTCDataChannelEvent() constructor creates a new RTCDataChannelEvent object.

Note: You will rarely if ever construct an RTCDataChannelEvent by hand; these events are normally created and sent by the WebRTC layer itself.

Syntax
new RTCDataChannelEvent(type, options)
Parameters
type

A string with the name of the event. It is case-sensitive and browsers always set it to datachannel.

options

An object that, in addition of the properties defined in Event(), can have the following properties:

channel

A RTCDataChannel, representing the data channel being associated with the event.

Return value

A new RTCDataChannelEvent object configured as specified.

Example

In this example, a new datachannel event is created. dc is a data channel which already exists.

const event = new RTCDataChannelEvent("datachannel", { channel: dc });
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4