大网数据广告活动
Web 标准与前端开发

PresentationConnection

· 52CE 我爱测

The **`PresentationConnection`** interface of the Presentation API provides methods and properties for managing a single presentation. Each presentation connection is represented by a `PresentationConnection` object. Both the controlling user agent and receiving user agent _MUST_

Presentation API

The PresentationConnection interface of the Presentation API provides methods and properties for managing a single presentation. Each presentation connection is represented by a PresentationConnection object. Both the controlling user agent and receiving user agent MUST implement PresentationConnection.

Instance properties

  • PresentationConnection.binaryType
    • : Returns either blob or arrayBuffer. When a PresentationConnection object is created, its binaryType IDL attribute MUST be set to the string "arraybuffer".
  • PresentationConnection.id
    • : Provides the presentation connection identifier.
  • PresentationConnection.state
  • PresentationConnection.url
    • : Returns the URL used to create or reconnect to the presentation.

Instance methods

  • PresentationConnection.close()
    • : Closes the current connection and sends a PresentationConnectionCloseEvent to PresentationConnection/close event.
  • PresentationConnection.send()
    • : Sends either binary or text data between a controlling browsing context and a presenting browsing context.
  • PresentationConnection.terminate()
    • : Terminates the current connection and fires PresentationConnection/terminate_event event.

Events

  • PresentationConnection/close_event
    • : Fired when there is a call to PresentationConnection.close.
  • PresentationConnection/connect_event
    • : Fired when a presentation connection is established.
  • PresentationConnection/message_event
    • : Fired when there is a call to PresentationConnection.send.
  • PresentationConnection/terminate_event
    • : Fired when there is a call to PresentationConnection.terminate.

Specifications

Browser compatibility

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。