ES3.1 Object static methods rationale document

Douglas Crockford douglas at
Wed Jul 16 05:39:18 PDT 2008

Brendan Eich wrote:
> * No rationale responding to the thread containing this message:
> 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