-
Notifications
You must be signed in to change notification settings - Fork 846
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
ES2015 Object own keys order issues #1389
Comments
At least for HtmlUnit i did some hacking in this way HtmlUnit@e6c4c79 But i guess we can't fix this without breaking the backward compatibility. |
In what way does it break backwards compatibility? Just that the keys will be ordered differently (but properly)? |
Thanks -- can we narrow this down to a specific list of issues?
It sounds like there is an issue with numeric keys that can't be used as
array indices -- Rhino is improperly treating them as numbers whereas they
should be left as strings. It's not clear yet whether this is a problem
when the keys are inserted or in the comparator that's used to compute the
(unnecessarily expensive, IMO) sort order required to implement the spec.
It sounds like there also might be an issue with JSON.stringify, as it
should never skip keys.
Are there other specific issues?
…On Mon, Oct 2, 2023 at 5:29 AM Paul Bakker ***@***.***> wrote:
In what way does it break backwards compatibility? Just that the keys will
be ordered differently (but properly)?
—
Reply to this email directly, view it on GitHub
<#1389 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7I2YO5AEFGRA6OAHQZLLX5KXTFAVCNFSM6AAAAAA5PB6B7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBSHEZDMNJXHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I haven't done a full analysis, the same code above was just a quick test I did locally after I saw the many failures in the ES2015 own keys section in the Kangax Compat table |
more details about the HtmlUnit story are here HtmlUnit/htmlunit#595 |
Rhino doesn't conform to the rules laid out in ES2015 wrt the ordering of own keys in objects
Some quick examples of at least some of the issues:
See:
The text was updated successfully, but these errors were encountered: