Nickolay Ponomarev wrote:
> No, actually it's better to avoid modifying Array.prototype or
> Object.prototype altogether those objects are shared with other
> scripts. Exactly because of this problem - someone will try to use the
> for..in loop to cycle through array's items or object's own
> properties.

Given the fact that script will be executed in an environment that can be
modified by third-party scripts, there are two options: a) to do necessary
type checks inside of a for-in loop, b) to explicitly forbid such
modification in the documentation. Neither is done, so it's someone's
problem.

--
0xdeadbeef

_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to