PresentationConnectionCloseEvent

可用性有限

此特性不是基线特性,因为它在一些最广泛使用的浏览器中不起作用。

实验性: 这是一项实验性技术
在生产中使用此技术之前,请仔细检查浏览器兼容性表格

安全上下文: 此功能仅在安全上下文(HTTPS)中可用,且支持此功能的浏览器数量有限。

PresentationConnectionCloseEvent 接口是 Presentation API 的一部分,当 PresentationConnection 被关闭时,会在其上触发。

Event PresentationConnectionCloseEvent

构造函数

PresentationConnectionCloseEvent() 实验性

创建一个新的 PresentationConnectionCloseEvent。

实例属性

PresentationConnectionCloseEvent.message 只读 实验性

提供有关连接关闭原因的可读消息。

PresentationConnectionCloseEvent.reason 只读 实验性

指示连接关闭的原因。此属性取以下值之一:errorclosedwentaway

规范

规范
Presentation API
# interface-presentationconnectioncloseevent

浏览器兼容性