Subclassing ES6 objects with ES5 syntax.

Domenic Denicola d at domenic.me
Sat Apr 25 20:33:42 UTC 2015


From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of C. Scott Ananian

> But in the code given previously, I've used `Object.setPrototypeOf` to effectively change the type of the object -- but [[PromiseConstructor]] doesn't follow along.

That is exactly the kind of tampering that the unforgable [[PromiseConstructor]] mechanism is meant to prevent.



More information about the es-discuss mailing list