- From: Timothy Gu <notifications@github.com>
- Date: Sat, 14 Mar 2020 23:03:46 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/pull/840/review/374773720@github.com>
TimothyGu commented on this pull request.
> @@ -13629,6 +13803,250 @@ internal method as follows.
1. Return <a abstract-op>OrdinaryGetOwnProperty</a>(|O|, |P|).
</div>
+<h3 id="es-observable-arrays">Observable array exotic objects</h3>
+
+An <dfn>observable array exotic object</dfn> is a specific type of ECMAScript
+[=Proxy exotic object=] which is created using the proxy traps defined in this section. They are
+defined in this manner because the ECMAScript specification includes special treatment for
+[=Proxy exotic objects=] that have <code>Array</code> instances as their proxy target, and we want
+to ensure that [=observable array types=] are exposed to ECMAScript code with this special treatment
+intact.
I think we should be clear what this special treatment is (as far as I can tell, IsArray). Even better, I think an implementation note that this is (as @bzbarsky said) "black-box-identical" to having "an IDL object with an indexed getter and indexed setter, but returning true from IsArray and with Array.prototype on the proto chain".
I feel it is regrettable that observable arrays have to be defined this way, and I think having more context in the spec itself will help people in the future understand the decisions being made now.
--
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/pull/840#pullrequestreview-374773720
Received on Sunday, 15 March 2020 06:04:02 UTC