When copying a DOM object, following line fails:
child[i] = _clone(parent[i], depth - 1);
|
child[i] = _clone(parent[i], depth - 1); |
TypeError: The HTMLDivElement.align setter can only be used on instances of HTMLDivElement
It seems like calling Object.getPrototypeOf on a DOM element gives HTMLDivElementPrototype which has a slightly different behavior than HtmlDivElement.
Reproducible in Safari Version 10.0 (10602.1.50.0.10)