Check for `Element` prevents correctly working under jsdom
carsonreinke opened this issue · 0 comments
carsonreinke commented
Under a jsdom environment Element
is not an Object
.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
https://github.com/que-etc/resize-observer-polyfill/blob/master/src/ResizeObserverSPI.js#L76
Probably simply just removing the later condition unless there was some reason for that.
Related to #50.