[Webkit-unassigned] [Bug 265565] New: Sync and update 'WebSockets.idl' as per WebIDL Specification

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 30 00:24:40 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=265565

            Bug ID: 265565
           Summary: Sync and update 'WebSockets.idl' as per WebIDL
                    Specification
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ahmad.saleem792 at gmail.com
                CC: annevk at annevk.nl

Hi Team,

While looking into WebSockets.idl file in reference to web-spec, I noticed few things:

Web-Socket: https://websockets.spec.whatwg.org/#the-websocket-interface

1) Following constructor should be as per Web-Spec:

Current:

constructor(USVString url, optional sequence<DOMString> protocols = []);

>From Web-Spec:

constructor(USVString url, optional (DOMString or sequence<DOMString>) protocols = []);

NOTE: If we have second constructor to separate 'DOMString' and 'sequence<DOMString>' but then we have below issue.

> Constructor with 'protocol' while I think it should be 'protocols'. It has missing 's'. I checked 'Gecko' (Websocket.webidl) and didn't find constructor with 'protocol'.

2) 'bufferedAmount' should be 'long long' rather than just 'long':

Current:

readonly attribute unsigned long bufferedAmount;

>From Web-Spec:

readonly attribute unsigned long long bufferedAmount;

3) In 'messaging' for 'send()', we have it as 'ArrayBuffer' rather than using typedef 'BufferSource' (looks cleaner IMO):

typedef (ArrayBufferView or ArrayBuffer) BufferSource;

and then:

undefined send((BufferSource or Blob or USVString) data);

rather than current four line:

    undefined send(ArrayBuffer data);
    undefined send(ArrayBufferView data);
    undefined send(Blob data);
    undefined send(USVString data);

__

I just wanted to raise so we can track all of them. I might not be able to fix this quite easily. So I will leave it for others to figure out.

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231130/c8338cf1/attachment.htm>


More information about the webkit-unassigned mailing list