Closed WickyNilliams closed 8 years ago
Using instanceof to check for arrays etc. can cause issues across frame boundaries. Each document has a different context so one array may not be an instanceof another.
instanceof
var frame = document.createElement("iframe"); frame.onload = function(e) { console.log([] instanceof frame.contentWindow.Array); // false } document.body.appendChild(frame);
Hm, I don't quite follow the case where this could cause a problem for seamless-immutable.
seamless-immutable
Could you show a code example where this would lead seamless-immutable to behave undesirably?
Using
instanceof
to check for arrays etc. can cause issues across frame boundaries. Each document has a different context so one array may not be aninstanceof
another.