W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

[Bug 23682] Fix the current [ArrayClass], [] and sequence<T> mess

From: <bugzilla@jessica.w3.org>
Date: Wed, 30 Oct 2013 18:45:08 +0000
To: public-script-coord@w3.org
Message-ID: <bug-23682-3890-CvaTJ9Pukd@http.www.w3.org/Bugs/Public/>

Allen Wirfs-Brock <allen@wirfs-brock.com> changed:

           What    |Removed                     |Added
                 CC|                            |allen@wirfs-brock.com

--- Comment #1 from Allen Wirfs-Brock <allen@wirfs-brock.com> ---
In general, I think this is a quite reasonable set of rules.

(In reply to Jonas Sicking from comment #0)
> For E we should simply accept an iterable object. Probably need to define on
> a per-API basis if data of the wrong type inside the array is ignored or if
> it causes a TypeError exception.

An API should identify whether it retains a reference to an object, or not.  If
an API retains a reference it will have visibility of any subsequent changes to
the object by the JS code. So, if an API does not what to be affected by
subsequent changes to the object it needs to either either copy the data from
the object (and not retain a reference) or require that it only be passed a
frozen object.

I suggest you decide upon the most common case (retained or not retained) and
add a attribute that explicitly identifies the less common case.

Ideally, retained objects would be least common, but it may be that in the
context of DOM tree manipulation that isn't the case.

You are receiving this mail because:
You are on the CC list for the bug.
Received on Wednesday, 30 October 2013 18:45:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC