Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work in progress: Record & Tuple integration #1

Closed
wants to merge 5 commits into from
Closed

Conversation

rricard
Copy link
Owner

@rricard rricard commented Aug 5, 2022

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chrome: …
    • Firefox: …
    • Safari: …
    • Deno: …
    • Node.js: …
    • webidl2.js: …
    • widlparser: …

(See WHATWG Working Mode: Changes for more details.)


This candidate change aims to integrate the now Stage 2 Record & Tuple TC39 proposal in WebIDL.

Our current & minimal goal in integrating in WebIDL is to first make APIs tolerate Records in-place of option bags and Tuples in-place of enumerables. This means we are only defining an interaction with ECMAScript for now, no new WebIDL types. This would enable a developer to write the following:

const headers = #{
  'Content-Type': 'text/xml',
};
await fetch('https://example.com/', #{ method: "PUT", headers });

If and when Record & Tuple usage in JS is proven and DOM APIs would want to be able to return them, we will consider adding them as WebIDL types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant