immersive-web / hit-test

Home Page:https://immersive-web.github.io/hit-test/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

domenic opened this issue · comments

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 whatwg/webidl#1399. It would be lovely if you could move to using sequence<>s.

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