// Copyright 2020 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://wicg.github.io/web-transport/#web-transport [ ActiveScriptWrappable, Exposed=(Window,Worker), RuntimeEnabled=QuicTransport ] interface WebTransport { [CallWith=ScriptState, RaisesException, MeasureAs=WebTransport] constructor(USVString url, optional QuicTransportOptions options = {}); [CallWith=ScriptState, RaisesException] Promise createUnidirectionalStream(); readonly attribute ReadableStream incomingUnidirectionalStreams; [CallWith=ScriptState, RaisesException] Promise createBidirectionalStream(); readonly attribute ReadableStream incomingBidirectionalStreams; readonly attribute WritableStream datagramWritable; readonly attribute ReadableStream datagramReadable; void close(optional WebTransportCloseInfo closeInfo = {}); readonly attribute Promise ready; readonly attribute Promise closed; };