WICG / shared-storage

Explainer for proposed web platform Shared Storage API
Other
85 stars 18 forks source link

Use of FrozenArray<SharedStorageUrlWithMetadata> as an argument type makes no sense #143

Closed domenic closed 1 week ago

domenic commented 3 months ago

The spec has two methods which take FrozenArray<SharedStorageUrlWithMetadata>.

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<SharedStorageUrlWithMetadata>.

(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 parameter type 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 2 weeks ago

Ping! This is one of the last things we need to fix to help with https://github.com/whatwg/webidl/issues/1399.

xyaoinum commented 1 week ago

This is done in: https://github.com/WICG/shared-storage/pull/162