Re: [whatwg/webidl] non-readonly [FrozenArray] attributes are footguns as currently specced (#810)

Note: currently webref lists the following interfaces with non-readonly `FrozenArray<T>` attributes.

- `ARIAMixin`
- `MediaMetadata`
- `BluetoothLEScanPermissionResult` (bug?)
- `BluetoothPermissionResult` (bug?)
- `USBPermissionResult` (bug?)
- `XRPermissionStatus` (bug?)

I'm not sure what's up with all the permission results needing to be mutable; the base class `PermissionStatus` is immutable. They just seem like cargo-culted bugs. None of the specs I skimmed had setter steps defined.

So I would suggest the following plan for this issue:

0. Figure out whether we're going to support non-readonly `FrozenArray<T>` attributes. We could instead consider upgrading `ARIAMixin` and `MediaMetadata` to `ObservableArray<>`, and then making the various permission results readonly. That is probably the nicest plan, but requires implementer work.

1. Either way, let's make the spec for `FrozenArray<>` easier to work with. The plan in https://github.com/whatwg/webidl/issues/810#issuecomment-1849465109 starting "Here's a stab:" seems still sound and nicely parallels the spec authoring experience for `ObservableArray<>`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/810#issuecomment-2033784943
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/810/2033784943@github.com>

Received on Wednesday, 3 April 2024 07:42:10 UTC