Table of Contents

Class PresentationConnection

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
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.
[Value("PresentationConnection")]
public class PresentationConnection : EventTarget
Inheritance
PresentationConnection
Inherited Members

Remarks

Constructors

PresentationConnection()

public PresentationConnection()

Properties

BinaryType

NOTE
Experimental
When a PresentationConnection object is created, its binaryType IDL attribute MUST be set to the string "arraybuffer". Upon getting, the attribute MUST return its most recent value (the value it was last set as). Upon setting, the user agent MUST set the IDL attribute to the new value.
[Value("binaryType")]
public BinaryType BinaryType { get; set; }

Property Value

BinaryType

Remarks

NOTE

The binaryType attribute allows authors to control how binary data is exposed to scripts. By setting the attribute to "blob", binary data is returned in Blob form; by setting it to "arraybuffer", it is returned in ArrayBuffer form. The attribute defaults to "arraybuffer". This attribute has no effect on data sent in a string form.

See also on MDN

Id

NOTE
Experimental
The id attribute specifies the presentation identifier of a presentation connection.
[Value("id")]
public string Id { get; }

Property Value

string

Remarks

Onclose

[Value("onclose")]
public EventHandlerNonNull Onclose { get; set; }

Property Value

EventHandlerNonNull

Onconnect

[Value("onconnect")]
public EventHandlerNonNull Onconnect { get; set; }

Property Value

EventHandlerNonNull

Onmessage

[Value("onmessage")]
public EventHandlerNonNull Onmessage { get; set; }

Property Value

EventHandlerNonNull

Onterminate

[Value("onterminate")]
public EventHandlerNonNull Onterminate { get; set; }

Property Value

EventHandlerNonNull

State

NOTE
Experimental
The state attribute reflects the presentation connection's current state. Depending on the current PresentationConnectionState, the state attribute can hold one of the following values.
[Value("state")]
public PresentationConnectionState State { get; }

Property Value

PresentationConnectionState

Remarks

Url

NOTE
Experimental
The url read-only property of the
PresentationConnection interface returns the URL used to create or
reconnect to the presentation.
[Value("url")]
public string Url { get; }

Property Value

string

A string containing a URL.

Remarks

Methods

Close()

NOTE
Experimental
When the close() method is called on a PresentationConnection, the {{Glossary("user agent")}} begins the process of closing the connection by sending an empty closeMessage with the closeReason set to closed.
[Value("close")]
public GlobalObject.Undefined Close()

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Send(Blob)

NOTE
Experimental
The send() method of the
PresentationConnection interface tells a controlling browsing context to
send binary or text data to a presenting browsing context.
[Value("send")]
public GlobalObject.Undefined Send(Blob data)

Parameters

data Blob

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Send(ArrayBuffer)

NOTE
Experimental
The send() method of the
PresentationConnection interface tells a controlling browsing context to
send binary or text data to a presenting browsing context.
[Value("send")]
public GlobalObject.Undefined Send(ArrayBuffer data)

Parameters

data ArrayBuffer

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Send(Union223)

NOTE
Experimental
The send() method of the
PresentationConnection interface tells a controlling browsing context to
send binary or text data to a presenting browsing context.
[Value("send")]
public GlobalObject.Undefined Send(Union223 data)

Parameters

data Union223

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Send(string)

NOTE
Experimental
The send() method of the
PresentationConnection interface tells a controlling browsing context to
send binary or text data to a presenting browsing context.
[Value("send")]
public GlobalObject.Undefined Send(string message)

Parameters

message string

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Terminate()

NOTE
Experimental
When the terminate() method is called on a PresentationConnection, the {{Glossary("user agent")}} begins the process of terminating the presentation. The exact process differs depending on whether terminate() is called in the controlling or the presenting context.
[Value("terminate")]
public GlobalObject.Undefined Terminate()

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks