- From: philomathic_life via GitHub <sysbot+gh@w3.org>
- Date: Wed, 12 Jun 2024 18:08:21 +0000
- To: public-webauthn@w3.org
zacknewman has just created a new issue for https://github.com/w3c/webauthn: == Dictionary members should be ordered lexicographically per Web IDL Standard == Per Web IDL Standard: > The order of the [dictionary members](https://webidl.spec.whatwg.org/#dfn-dictionary-member) on a given dictionary is such that inherited dictionary members are ordered before non-inherited members, and the dictionary members on the one dictionary definition (including any partial dictionary definitions) are ordered lexicographically by the Unicode codepoints that comprise their identifiers. > > ```js > dictionary B : A { > long b; > long a; > }; > > dictionary A { > long c; > long g; > }; > > dictionary C : B { > long e; > long f; > }; > > partial dictionary A { > long h; > long d; > }; > ``` > the order of the [dictionary members](https://webidl.spec.whatwg.org/#dfn-dictionary-member) of > a dictionary value of type `C` is `c`, `d`, `g`, `h`, `a`, `b`, `e`, `f`. This means that while dictionary definitions in the spec are fine since the order of members only applies to _values_ of the dictionary, most of the payloads I have seen in the "wild" simply follow the order of the definitions. Here is an [example](https://www.w3.org/TR/webauthn-3/#example-838c9f88) in the spec itself that violates Web IDL. If the dictionary definitions were ordered the way values must be ordered though, then I believe implementations will be less likely to violate the Web IDL Standard. Please view or discuss this issue at https://github.com/w3c/webauthn/issues/2083 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 12 June 2024 18:08:22 UTC