blob: 9b64a622b0312c6514f951c094a4598d805b8add [file] [log] [blame]
// Copyright 2019 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.
// TODO(ricea): Add standard link when there is one.
[
Exposed=(Window,Worker),
RuntimeEnabled=WebSocketStream,
ActiveScriptWrappable
] interface WebSocketStream {
[CallWith=ScriptState, RaisesException, MeasureAs=WebSocketStreamConstructor] constructor(USVString url, optional WebSocketStreamOptions options = {});
readonly attribute USVString url;
[CallWith=ScriptState] readonly attribute Promise<WebSocketConnection> connection;
[CallWith=ScriptState] readonly attribute Promise<WebSocketCloseInfo> closed;
[RaisesException] void close(optional WebSocketCloseInfo closeInfo = {});
};