Skip to content

Accept a sequence of strings in the WebSocket constructor #9053

Closed

Description

@KiChjang

The WebIDL definitions for WebSocket has been updated upstream at the HTML specification documentation. In our current code, we use optional (DOMString or DOMString) protocols as the second argument to the constructor of WebSockets. The updated spech here instead uses optional (DOMString and sequence<DOMString>) protocols.

Code: components/script/dom/webidls/WebSockets.webidl, components/script/dom/websocket.rs
Spec: https://html.spec.whatwg.org/multipage/comms.html#the-websocket-interface
Test: tests/wpt/web-platform-tests/websockets/constructor.html

Activity

  1. added
    A-content/dom
    E-less-complex
    I-refactor
    on Dec 23, 2015
  2. emilio commented on Dec 23, 2015

    @emilio
    Member

    I think this is blocked by #544

  3. KiChjang commented on Dec 23, 2015

    @KiChjang
    ContributorAuthor

    That issue is still open? Weird, because #9049 uses sequence<> for getAll and it compiled fine for me.

  4. KiChjang commented on Dec 23, 2015

    @KiChjang
    ContributorAuthor

    Oh I see what the problem is - Codegen.py currently doesn't support sequence values as parameters.

  5. emilio commented on Dec 23, 2015

    @emilio
    Member

    Yeah, I implemented return values in #8412, but no arguments yet.

  6. nox commented on Dec 23, 2015

    @nox
    Contributor

    Blocked by #9056.

  7. added
    S-blocked-on-external
    on Dec 23, 2015
  8. frewsxcv commented on Jan 12, 2016

    @frewsxcv
    Contributor

    #9056 has merged

  9. removed
    S-blocked-on-external
    on Jan 12, 2016
  10. changed the title [-]Update WebSocket Constructor[/-] [+]Accept a sequence of strings in the WebSocket constructor[/+] on Jan 12, 2016
  11. chkimes commented on Jan 14, 2016

    @chkimes
    Contributor

    Looks like this still won't work with the WebIDL definition since the second parameter is optional (DOMString or sequence<DOMString>) protocols and the codegen doesn't currently support sequences in union types.

    https://github.com/servo/servo/blob/master/components/script/dom/bindings/codegen/CodegenRust.py#L3575

  12. frewsxcv commented on Jan 14, 2016

    @frewsxcv
    Contributor

    Blocked on #9290 maybe?

  13. added
    S-blocked-on-external
    on Jan 14, 2016
  14. 11 remaining items

  15. added 2 commits that reference this issue on Jan 17, 2016
  16. emilio commented on Jan 17, 2016

    @emilio
    Member

    This should be no longer blocked

  17. removed
    S-blocked-on-external
    on Jan 17, 2016
  18. added
    E-less-complex
    on Jan 17, 2016
  19. jsanders commented on Jan 17, 2016

    @jsanders
    Contributor

    Just came across this while updating test expectations for my work on #7860, which fixes some stuff that was hiding failures caused by this issue. Can I grab this one as well, since I have spec'd out some changes for it in order to fix my test?

  20. nox commented on Jan 17, 2016

    @nox
    Contributor

    @jsanders Sure!

  21. added
    C-assigned
    on Jan 17, 2016
  22. chkimes commented on Jan 18, 2016

    @chkimes
    Contributor

    @jsanders If you've already written/writing code for this then go for it, but I've got a commit ready that was waiting for #9304 to merge. In hindsight, I should have asked for this to be assigned.

  23. jsanders commented on Jan 18, 2016

    @jsanders
    Contributor

    @ckimes89: D'oh, just pushed #9360. Looks like a pretty similar solution. I'm not fussed either way.

  24. chkimes commented on Jan 18, 2016

    @chkimes
    Contributor

    @jsanders All yours, I should've spoken up earlier.

  25. added 2 commits that reference this issue on Jan 18, 2016
    4e348d0
    03a0b73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domC-assignedE-less-complexI-refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions