Re: [heycam/webidl] Define [[OwnPropertyKeys]] of legacy platform objects (#402)

> Firefox and Edge's setters incorrectly ignore symbols

The behavior for symbols is actually not defined right now; the spec's text for them makes no sense and isn't implementable.  In particular, [[Set]] in the spec ends up calling OrdinarySet for symbols, which eventually lands in the webidl-defined [[DefineOwnProperty]], which is broken in the face of symbols; see https://github.com/heycam/webidl/issues/175.  Once that issue is resolved, I'll update Firefox to whatever that resolution is.

> Chrome and Firefox put integer index properties first even when it is really a named property and should be enumerated chronologically

If we're still talking about Storage, then in the case of Firefox the order is rather random.  In particular, it's just iterating the keys of a non-ordered hashtable, so the precise order will depend on how the keys collided, where they landed in the hashtable, etc.  As in, we just don't implement the "chronological order" bit from the spec at all.

As far as the test goes, it might also be worth checking that while `sessionStorage.getItem` keeps returning the function, `sessionStorage.getItem("getItem")` returns `42`.

> Do you have any comments regarding this PR itself though?

Yes, I do.  It's totally awesome.  ;)   I was worried about duplication in the list, but the fix we did for named props not shadowing existing own props even on [OverridBuiltins] interfaces makes everything work out great.

Thank you for doing this!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/402#issuecomment-321979894

Received on Saturday, 12 August 2017 13:07:37 UTC