From 083c65cdc2e85702248195f8edc273292ff9d980 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 6 May 2021 13:11:28 -0400 Subject: [PATCH] Remove entry settings object usage in the WebSocket constructor This matches implementations, and helps with #1431. Also, slightly modernize the algorithm. --- source | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source b/source index b2443d52457..42dc1d46857 100644 --- a/source +++ b/source @@ -97646,8 +97646,9 @@ interface WebSocket : EventTarget {
-

The WebSocket(url, - protocols) constructor, when invoked, must run these steps:

+

The new WebSocket(url, protocols) + constructor steps are:

  1. Let urlRecord be the result of applying the URL parser to @@ -97672,13 +97673,19 @@ interface WebSocket : EventTarget { The WebSocket protocol, then throw a "SyntaxError" DOMException.

  2. +
  3. Set this's url to + urlRecord.

  4. + +
  5. Let client be this's relevant settings + object.

  6. +
  7. Run this step in parallel:

    1. Establish a WebSocket connection given - urlRecord, protocols, and the entry settings object. urlRecord, protocols, and client.

      If the establish a WebSocket @@ -97691,9 +97698,6 @@ interface WebSocket : EventTarget {

  8. - -
  9. Return a new WebSocket object whose url is urlRecord.