Closed buschtoens closed 7 years ago
Hi, it does work for absolute elements. The line el.innerText = width + " x " + height;
nukes the content of the element that you are trying to observe, which then removes the listener mechanics. If you replace that line with a console.log
for instance, you will see that it does work.
Apparently absolutely positioned elements are incompatible.
https://jsbin.com/veyulajohu/3/edit?html,css,js,output