blob: 0210567727c98b333c7344dd3eafdfe692a22b7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://w3c.github.io/presentation-api/#interface-presentationconnection
enum PresentationConnectionState {
"connected",
"closed",
"terminated"
};
[
GarbageCollected,
RuntimeEnabled=Presentation
] interface PresentationConnection : EventTarget {
readonly attribute DOMString? id;
readonly attribute PresentationConnectionState state;
[MeasureAs=PresentationConnectionClose] void close();
[MeasureAs=PresentationConnectionTerminate] void terminate();
[DeprecateAs=PresentationConnectionStateChangeEventListener] attribute EventHandler onstatechange;
attribute EventHandler onconnect;
attribute EventHandler onclose;
attribute EventHandler onterminate;
// Communication
attribute BinaryType binaryType;
attribute EventHandler onmessage;
[RaisesException, MeasureAs=PresentationConnectionSend] void send(DOMString message);
[RaisesException, MeasureAs=PresentationConnectionSend] void send(Blob data);
[RaisesException, MeasureAs=PresentationConnectionSend] void send(ArrayBuffer data);
[RaisesException, MeasureAs=PresentationConnectionSend] void send(ArrayBufferView data);
};
|