PresentationConnection
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Giao diện PresentationConnection của Presentation API cung cấp các phương thức và thuộc tính để quản lý một bản trình bày đơn lẻ. Mỗi kết nối trình bày được đại diện bởi một đối tượng PresentationConnection. Cả tác nhân người dùng điều khiển và tác nhân người dùng nhận đều PHẢI triển khai PresentationConnection.
Thuộc tính phiên bản
PresentationConnection.binaryTypeExperimental-
Trả về blob hoặc arrayBuffer. Khi một đối tượng
PresentationConnectionđược tạo, thuộc tính IDLbinaryTypePHẢI được đặt thành chuỗi"arraybuffer". PresentationConnection.idRead only Experimental-
Cung cấp định danh kết nối trình bày.
PresentationConnection.stateRead only Experimental-
Trả về trạng thái hiện tại của kết nối trình bày.
PresentationConnection.urlRead only Experimental-
Trả về URL được dùng để tạo hoặc kết nối lại với bản trình bày.
Phương thức phiên bản
PresentationConnection.close()Experimental-
Đóng kết nối hiện tại và gửi một
PresentationConnectionCloseEventtới sự kiệnclose. PresentationConnection.send()Experimental-
Gửi dữ liệu nhị phân hoặc văn bản giữa ngữ cảnh duyệt web điều khiển và ngữ cảnh duyệt web đang trình bày.
PresentationConnection.terminate()Experimental-
Kết thúc kết nối hiện tại và kích hoạt sự kiện
terminate.
Sự kiện
closeExperimental-
Được kích hoạt khi có lời gọi đến
PresentationConnection.close(). connectExperimental-
Được kích hoạt khi một kết nối trình bày được thiết lập.
messageExperimental-
Được kích hoạt khi có lời gọi đến
PresentationConnection.send(). terminateExperimental-
Được kích hoạt khi có lời gọi đến
PresentationConnection.terminate().
Thông số kỹ thuật
| Specification |
|---|
| Presentation API> # interface-presentationconnection> |