ES3.1 Object static methods rationale document
Douglas Crockford
douglas at crockford.com
Wed Jul 16 05:39:18 PDT 2008
Brendan Eich wrote:
> * No rationale responding to the thread containing this message:
>
> https://mail.mozilla.org/pipermail/es4-discuss/2007-September/001114.html
>
> that questions the wisdom of getPrototypeOf. The other rationales are
> helpful, the lack of one responding to this public thread questioning
> essentially the same design element is a lack -- what do you think?
The motivation for these methods is to allow Ajax libraries and the Caja runtime
to harden the environment. Such a library can use and them remove these methods,
disallowing access by guest code.
> * Did you consider prototype's Object.extend method:
>
> Object.extend = function(destination, source) {
> for (var property in source)
> destination[property] = source[property];
> return destination;
> };
Yes we did.
More information about the Es4-discuss
mailing list