chromium/third_party/blink/renderer/modules/websockets/websocket_error.idl

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://websocket.spec.whatwg.org/#websocket-error-interface
[
    Exposed=(Window,Worker),
    RuntimeEnabled=WebSocketStream
] interface WebSocketError : DOMException {
  [RaisesException] constructor(optional DOMString message = "",
                                optional WebSocketCloseInfo init = {});

  readonly attribute unsigned short? closeCode;
  readonly attribute USVString reason;
};