blob: e0d205d06cb19bd47f1d90c37ea65b597051169c [file] [log] [blame]
// 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();
attribute EventHandler onstatechange;
// 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);
};