Object.equals() and Object.clone()
f.bagnardi at gmail.com
Tue Nov 15 01:58:29 UTC 2016
It's pretty hard to decide how these behave, specifically with custom
classes. Focusing on Object.clone...
- with classes do you call the constructor, and with what arguments?
- HTMLElement and sub classes can't be constructed directly, what happens
- do you copy internal properties? this would make it hard to polyfill
- how does it behave with getters and setters?
- with regular expressions do you copy the lastIndex?
Most of those apply to Object.equals also.
On Mon, Nov 14, 2016 at 6:25 PM, Kevin Barabash <kevinb at khanacademy.org>
> It would be nice if deep equality checking and deep cloning of objects was
> included in the standard library. Has there been any proposals around
> including these in the past?
> – Kevin
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss