Re: [whatwg/webidl] ObservableArray types in namespace (#1000)

> prevents OAs from being nullable

A nullable OA meant you’d hit undefined behavior in the the getter/setter steps for OA attributes (which would seemingly need to do something novel with the backing list?). Unless there were motivations besides fixing the bug, I suspect specifying the missing behavior would permit lifting the constraint.

> or put into another OA

It seems like there’s a whole lot that prevents OA\<OA\> from being coherent currently. Instances are 1:1 with interface objects or platform objects, created during [define the attributes](https://webidl.spec.whatwg.org/#define-the-attributes) (but see below). The getter/setter behaviors of the attributes depend on the backing list / “backing observable array exotic object” (@_@) associations and that accessor behavior would seemingly need to be the OA’s own index-key behavior.

_Step 8 in [define the attributes](https://webidl.spec.whatwg.org/#define-the-attributes) creates and “installs” the “backing observable array exotic object”. But when this algorithm runs with the OA-typed regular attributes, the _target_ ... is a prototype! Currently, each prototype apparently gets a unique OA and instances get nuthin.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1000#issuecomment-1113857717

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/1000/1113857717@github.com>

Received on Friday, 29 April 2022 23:22:14 UTC