I am asking why, to get an object's prototype, it has been implemented getPrototypeOf
as a static method on Object
's constructor rather than in its prototype?
Is there any reason for JS creators not to do
Object.prototype.getPrototypeOf = function() { return Object.getPrototypeOf(this); };
(which I could do myself but I know it is not good to extend JS standard objects' prototypes)?
[EDIT] Look, I am not proposing to add getPrototypeOf
to Object.prototype
, just curious about it wasn't done. I believe it was because of possible malfunctioning in specific cases