From 2958ec7e85c9a1182cd81728e3705948a2c39d71 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Fri, 28 May 2021 11:58:24 -0700 Subject: replace some domxref macro calls with event macro calls (#1016) --- files/zh-cn/web/api/rtcpeerconnection/ondatachannel/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files/zh-cn/web/api/rtcpeerconnection/ondatachannel') diff --git a/files/zh-cn/web/api/rtcpeerconnection/ondatachannel/index.html b/files/zh-cn/web/api/rtcpeerconnection/ondatachannel/index.html index 418f180f79..eae0184677 100644 --- a/files/zh-cn/web/api/rtcpeerconnection/ondatachannel/index.html +++ b/files/zh-cn/web/api/rtcpeerconnection/ondatachannel/index.html @@ -5,7 +5,7 @@ translation_of: Web/API/RTCPeerConnection/ondatachannel ---

{{APIRef("WebRTC")}}{{SeeCompatTable}}

-

RTCPeerConnection.ondatachannel 属性是一个{{domxref("EventHandler")}},当这个{{event("datachannel")}}事件在{{domxref("RTCPeerConnection")}}发生时,它指定的那个事件处理函数就会被调用。这个事件继承于 {{domxref("RTCDataChannelEvent")}},当远方伙伴调用{{domxref("RTCPeerConnection.createDataChannel", "createDataChannel()")}}时这个事件被加到这个连接(RTCPeerConnection)中。

+

RTCPeerConnection.ondatachannel 属性是一个{{event("Event_handlers")}},当这个{{event("datachannel")}}事件在{{domxref("RTCPeerConnection")}}发生时,它指定的那个事件处理函数就会被调用。这个事件继承于 {{domxref("RTCDataChannelEvent")}},当远方伙伴调用{{domxref("RTCPeerConnection.createDataChannel", "createDataChannel()")}}时这个事件被加到这个连接(RTCPeerConnection)中。

在这个事件被收到的同时,这个{{domxref("RTCDataChannel")}} 实际上并没有打开,确保在open这个事件在RTCDataChannel触发以后才去使用它。

-- cgit v1.2.3-54-g00ecf