RTCDataChannel.onclosing
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The RTCDataChannel.onclosing
property is an event handler which specifies a function to be called by the browser when the closing
event is received by the RTCDataChannel
. This is a simple Event
which indicates that the data channel is being closed, that is, RTCDataChannel
transitions to "closing" state. For example, after RTCDataChannel.close()
was called but the underlying data transport might not have been closed yet.
Syntax
RTCDataChannel.onclosing = function;
Value
A function which the browser will call to handle the closing
event. The function receives as its sole input parameter the event itself, as an object of type Event
.
Specifications
Specification |
---|
WebRTC 1.0: Real-Time Communication Between Browsers (WebRTC 1.0) # dom-rtcdatachannel-onclosing |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
onclosing |
81 |
81 |
No |
No |
68 |
No |
81 |
81 |
No |
58 |
No |
13.0 |
See also
- WebRTC
-
RTCDataChannel.onclose
event handler and itsclose
event. RTCDataChannel.onopen
- The
open
event and its type,Event
.
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onclosing