PresentationConnection

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.

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 Read only
Provides the presentation connection identifier.
PresentationConnection.state Read only
Returns the presentation connection's current state.
PresentationConnection.url Read only
Returns the URL used to create or reconnect to the presentation.

Event handlers

PresentationConnection.onclose
Fired when there is a call to PresentationConnection.close().
PresentationConnection.onconnect
Fired when a presentation connection is established.
PresentationConnection.onmessage
Fired when there is a call to PresentationConnection.send().
PresentationConnection.onterminated
Fired when there is a call to PresentationConnection.terminate().

Methods

PresentationConnection.close()
Closes the current connection and sends a PresentationConnectionCloseEvent to PresentationConnection.onclosed.
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.onterminated.

Specifications

Specification Status Comment
Presentation API
The definition of 'PresentationConnection interface' in that specification.
Candidate Recommendation Initial definition.

Browser Compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support48 ?511 ? ? ?
binaryType ? ?511 ? ? ?
close49 ?511 ? ? ?
id48 ?511 ? ? ?
onclose50 ?511 ? ? ?
onconnect50 ?511 ? ? ?
onmessage ? ?511 ? ? ?
onterminate50 ?511 ? ? ?
send48 ?511 ? ? ?
state48 ?511 ? ? ?
terminate ? ?511 ? ? ?
url57 ?511 ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No48 ?511 ? ? ?
binaryType ? ? ?511 ? ? ?
close No49 ?511 ? ? ?
id No48 ?511 ? ? ?
onclose No50 ?511 ? ? ?
onconnect No50 ?511 ? ? ?
onmessage ? ? ?511 ? ? ?
onterminate No50 ?511 ? ? ?
send No48 ?511 ? ? ?
state No48 ?511 ? ? ?
terminate ? ? ?511 ? ? ?
url No57 ?511 ? ? ?

1. From version 51: this feature is behind the dom.presentation.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

Document Tags and Contributors

Contributors to this page: lucian95, Sheppy, jpmedley, MashKao, rolfedh
Last updated by: lucian95,