Re: [w3c/gamepad] IDL array[]s no longer exist (#28)

Well, the array stuff was all up in the air for a while.  `T[]` was never implemented by any browser and is slated to be nixed from the spec.

What Gecko _actually_ uses here is:

    [Pure, Cached, Frozen]
    readonly attribute sequence<GamepadButton> buttons;

the `[Frozen]` bit gives this the same semantics as `FrozenArray`.  See https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#Frozen and compare to http://heycam.github.io/webidl/#dfn-create-frozen-array

In terms of how you would use a `FrozenArray` in the spec, I believe you would have the object store the `FrozenArray` and recreate it from a sequence as needed (e.g. whenever the list changes).  The storing of the value is handled automatically in Gecko's bindings due to the `Cached` thing, but would need to be explicitly spelled out in prose in the spec....

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/issues/28#issuecomment-236631405

Received on Monday, 1 August 2016 16:28:23 UTC