On Fri, Jun 9, 2017 at 1:57 PM, Adam Klein <ad...@chromium.org> wrote:
> On Thu, Jun 8, 2017 at 11:32 AM, Tab Atkins Jr. <jackalm...@gmail.com>
> wrote:
>> Note that if we don't get some variant of this functionality, these
>> APIs will instead do one of:
>>
>> * just using Proxies (already defined in WebIDL)
>
>
> When you say "Proxies" here, I believe you're referring to the "indexed
> properties" feature of WebIDL
> (https://heycam.github.io/webidl/#idl-indexed-properties). This seems like
> the right mechanism to use, from a WebIDL spec, to get the behavior you
> desire. In Chromium/V8, this doesn't actually use Proxies under the hood (we
> have something called "indexed property handlers", see the API at
> https://cs.chromium.org/chromium/src/v8/include/v8.h?rcl=ff98ddca4a1770c2868d44f1cdfe1d4656363f30&l=5781),
> but it's definitely implementable using Proxies.

Correct.

WebIDL's indexed getters/setters would fulfill my use-case *exactly*.
If that's okay to use, per TC39 consensus, then awesome!

However, in <https://github.com/heycam/webidl/issues/345#issuecomment-300734048>
Anne says:

> [When] we discussed those kind of approaches with TC39, they told us not
> to and to just use Array. It wasn't just about [], it was also about FileList,
> NodeList, etc. And the problem with those was not that they did not have
> enough methods like Array, it was that they required a proxy.

Thus my confusion/consternation.

If this is incorrect, and indexed getters/setters are indeed fine to
use in new APIs, then we can close this thread "no change" and I can
go away happy. ^_^

~TJ
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to