In this video (approx. 31 minutes in), Crockford says they (speaking on behalf of the ECMAScript committee) recommend not using Object.getPrototypeOf
. His explanation was that it wasn't really meant for the average developer but was meant for things like Caja, which may remove it from Object
to prevent you from accessing it.
Crockford can sometimes be pretty opinionated in his views on how JS should be used (can't we all?), so I'm wondering if this is really the full recommendation of the ES committee or if it's just one of Crockford's personal opinions. Has anyone read any official statement warning against using Object.getPrototypeOf
? It really sounds like a bummer to me :(, but I don't see any information on the MDN page warning against its use, and I would expect a notice to be there if it really was that bad of an idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With