PresentationConnection

可用性有限

此特性不是基線特性,因為它在一些最廣泛使用的瀏覽器中不起作用。

實驗性: 這是一項實驗性技術
在生產中使用此技術之前,請仔細檢查瀏覽器相容性表格

安全上下文: 此功能僅在安全上下文(HTTPS)中可用,且支援此功能的瀏覽器數量有限。

PresentationConnection 介面是 Presentation API 的一部分,提供了管理單個簡報的方法和屬性。每個 演示連線 都由一個 PresentationConnection 物件表示。控制使用者代理(controlling user agent)和接收使用者代理(receiving user agent)都必須實現 PresentationConnection

EventTarget PresentationConnection

例項屬性

PresentationConnection.binaryType 實驗性

返回 blob 或 arrayBuffer。當建立一個 PresentationConnection 物件時,其 binaryType IDL 屬性必須設定為字串 "arraybuffer"

PresentationConnection.id 只讀 實驗性

提供演示連線識別符號。

PresentationConnection.state 只讀 實驗性

返回演示連線的當前狀態。

PresentationConnection.url 只讀 實驗性

返回用於建立或重新連線到簡報的 URL。

例項方法

PresentationConnection.close() 實驗性

關閉當前連線並向 close 事件傳送一個 PresentationConnectionCloseEvent

PresentationConnection.send() 實驗性

在控制瀏覽上下文和呈現瀏覽上下文之間傳送二進位制或文字資料。

PresentationConnection.terminate() 實驗性

終止當前連線並觸發 terminate 事件。

事件

close 實驗性

在呼叫 PresentationConnection.close() 時觸發。

connect 實驗性

在建立演示連線時觸發。

message 實驗性

在呼叫 PresentationConnection.send() 時觸發。

terminate 實驗性

在呼叫 PresentationConnection.terminate() 時觸發。

規範

規範
Presentation API
# interface-presentationconnection

瀏覽器相容性