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

Investigate number parser reuse #8928

Open
annevk opened this issue Feb 21, 2023 · 1 comment
Open

Investigate number parser reuse #8928

annevk opened this issue Feb 21, 2023 · 1 comment
Labels
clarification Standard could be clearer normative change

Comments

@annevk
Copy link
Member

annevk commented Feb 21, 2023

I vaguely recall @ayg complaining ages ago about duplicating the parsers we already have for ECMAScript and Web IDL. I think the idea against that was that HTML should in theory be able to go beyond the limits imposed by those parsers. That might still be a worthwhile goal of sorts, but I don't think there's a good reason to have multiple specifications define ConvertToInt and the like.

@annevk annevk added the clarification Standard could be clearer label Feb 21, 2023
@domenic
Copy link
Member

domenic commented Feb 22, 2023

I don't think we should ask JS to change here. So it's a question of whether HTML can change to JS's semantics.

I think this might be a normative change, but probably one we could get away with.

For integers, the algorithms to compare are:

These definitely seem different, including e.g.:

  • the definition of white space that is used
  • how much leading/trailing garbage is allowed
  • ES's algorithm allows implementation-defined results after 20 digits (!)
  • ES's algorithm converts the results to floating point using 𝔽.

For floats:

I haven't investigated the differences there.

annevk added a commit that referenced this issue Feb 22, 2023
Other changes:

* Remove reflection of unrestricted double as it is buggy and unused.
* The DOMString getter steps did not account for a missing attribute.
* The native accessibility semantics map was renamed to the internal content attribute map as it's now a more general reflection concept.

Corresponding ARIA PR: w3c/aria#1876.

Fixes #8442.

Follow-up:

* w3c/core-aam#152
* w3c/aria#1110
* #3238
* #8544
* #8545
* #8926
* #8927
* #8928
* #8930
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer normative change
Development

No branches or pull requests

2 participants