You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: baselines/dom.generated.d.ts
+37-2Lines changed: 37 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3672,11 +3672,18 @@ declare var ClipboardEvent: {
3672
3672
3673
3673
/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
3674
3674
interface CloseEvent extends Event {
3675
+
/**
3676
+
* Returns the WebSocket connection close code provided by the server.
3677
+
*/
3675
3678
readonly code: number;
3679
+
/**
3680
+
* Returns the WebSocket connection close reason provided by the server.
3681
+
*/
3676
3682
readonly reason: string;
3683
+
/**
3684
+
* Returns true if the connection closed cleanly; false otherwise.
/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
18383
18390
interface WebSocket extends EventTarget {
18391
+
/**
18392
+
* Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
18393
+
*
18394
+
* Can be set, to change how binary data is returned. The default is "blob".
18395
+
*/
18384
18396
binaryType: BinaryType;
18397
+
/**
18398
+
* Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.
18399
+
*
18400
+
* If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)
18401
+
*/
18385
18402
readonly bufferedAmount: number;
18403
+
/**
18404
+
* Returns the extensions selected by the server, if any.
* Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation.
18413
+
*/
18391
18414
readonly protocol: string;
18415
+
/**
18416
+
* Returns the state of the WebSocket object's connection. It can have the values described below.
18417
+
*/
18392
18418
readonly readyState: number;
18419
+
/**
18420
+
* Returns the URL that was used to establish the WebSocket connection.
18421
+
*/
18393
18422
readonly url: string;
18423
+
/**
18424
+
* Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
18425
+
*/
18394
18426
close(code?: number, reason?: string): void;
18427
+
/**
18428
+
* Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
Copy file name to clipboardExpand all lines: baselines/webworker.generated.d.ts
+37-2Lines changed: 37 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -896,11 +896,18 @@ declare var Clients: {
896
896
897
897
/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
898
898
interfaceCloseEventextendsEvent{
899
+
/**
900
+
* Returns the WebSocket connection close code provided by the server.
901
+
*/
899
902
readonlycode: number;
903
+
/**
904
+
* Returns the WebSocket connection close reason provided by the server.
905
+
*/
900
906
readonlyreason: string;
907
+
/**
908
+
* Returns true if the connection closed cleanly; false otherwise.
/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
5278
5285
interfaceWebSocketextendsEventTarget{
5286
+
/**
5287
+
* Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
5288
+
*
5289
+
* Can be set, to change how binary data is returned. The default is "blob".
5290
+
*/
5279
5291
binaryType: BinaryType;
5292
+
/**
5293
+
* Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.
5294
+
*
5295
+
* If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)
5296
+
*/
5280
5297
readonlybufferedAmount: number;
5298
+
/**
5299
+
* Returns the extensions selected by the server, if any.
* Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation.
5308
+
*/
5286
5309
readonlyprotocol: string;
5310
+
/**
5311
+
* Returns the state of the WebSocket object's connection. It can have the values described below.
5312
+
*/
5287
5313
readonlyreadyState: number;
5314
+
/**
5315
+
* Returns the URL that was used to establish the WebSocket connection.
5316
+
*/
5288
5317
readonlyurl: string;
5318
+
/**
5319
+
* Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
5320
+
*/
5289
5321
close(code?: number,reason?: string): void;
5322
+
/**
5323
+
* Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
"websocket": "Creates a new WebSocket object, immediately establishing the associated WebSocket connection.\n\nurl is a string giving the URL over which the connection is established. Only \"ws\" or \"wss\" schemes are allowed; others will cause a \"SyntaxError\" DOMException. URLs with fragments will also cause such an exception.\n\nprotocols is either a string or an array of strings. If it is a string, it is equivalent to an array consisting of just that string; if it is omitted, it is equivalent to the empty array. Each string in the array is a subprotocol name. The connection will only be established if the server reports that it has selected one of these subprotocols. The subprotocol names have to match the requirements for elements that comprise the value of Sec-WebSocket-Protocol fields as defined by The WebSocket protocol. [WSP]",
3
+
"websocket-send": "Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.",
4
+
"websocket-close": "Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.",
5
+
"websocket-url": "Returns the URL that was used to establish the WebSocket connection.",
6
+
"websocket-readystate": "Returns the state of the WebSocket object's connection. It can have the values described below.",
7
+
"websocket-bufferedamount": "Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.\n\nIf the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)",
8
+
"websocket-extensions": "Returns the extensions selected by the server, if any.",
9
+
"websocket-protocol": "Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation.",
10
+
"websocket-binarytype": "Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:\n\nCan be set, to change how binary data is returned. The default is \"blob\".",
11
+
"closeevent-wasclean": "Returns true if the connection closed cleanly; false otherwise.",
12
+
"closeevent-code": "Returns the WebSocket connection close code provided by the server.",
13
+
"closeevent-reason": "Returns the WebSocket connection close reason provided by the server.",
14
+
"binarytype-blob": "Binary data is returned in Blob form.",
15
+
"binarytype-arraybuffer": "Binary data is returned in ArrayBuffer form."
0 commit comments