Re: [heycam/webidl] Figure-out what supporting Array-subclassing implies (#345)

Note that my current design, which I'll be hopefully looking to standardize in some "suggested pattern" in WebIDL in the future, is to use indexed getter/setter/creator, all unnamed, with the creator only allowing creating the very next index (in other words, you can do `foo[foo.length] = newThing`, but nothing else). This is paired with an `iterable<>` declaration.

(See <https://drafts.css-houdini.org/css-typed-om/#dom-cssunparsedvalue-length> and the following algorithm block for an example of this.)

> The advice I remember from TC39 is that even in that case, don't require a Proxy still applies, and until someone actually does the due diligence of working it through with them it's hard to support this.

I [tried to go thru TC39](https://esdiscuss.org/topic/intercepting-sets-on-array-like-objects); currently the responses are "indexed getters/setters don't use proxies in implementations, they seem like the right way to do this" and "new APIs should use Arrays and not typecheck", which disagree with each other, and there was no response to my attempt at follow-up.  I'll ping the thread again.

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

Received on Thursday, 22 February 2018 01:38:34 UTC