immersive-web / hit-test

https://immersive-web.github.io/hit-test/
Other
78 stars 31 forks source link

Use of FrozenArray<>s in dictionaries is unnecessary and bad #116

Closed domenic closed 2 months ago

domenic commented 5 months ago

The spec has two "init" dictionaries which accept FrozenArray<XRHitTestTrackableType>.

It's not clear what was intended here. But per the Web IDL spec, almost the exact same set of values are accepted compared to accepting the more conventional sequence<XRHitTestTrackableType>.

(The difference is that certain proxies for arrays, which define throwing getOwnPropertyDescriptor() traps, would be rejected, because in theory the implementation is supposed to freeze the incoming array.)

We'd like to prohibit the usage of FrozenArray<T> as a dictionary member in Web IDL, per https://github.com/whatwg/webidl/issues/1399. It would be lovely if you could move to using sequence<>s.

domenic commented 3 months ago

Ping on getting this updated! This is the last use of FrozenArray<> in a dictionary on the platform.