marcj / css-element-queries

CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
http://marcj.github.io/css-element-queries/
MIT License
4.27k stars 487 forks source link

Make the MutationObserver of ResizeSensor compatible with new Chrome version #249

Closed alubbe closed 5 years ago

alubbe commented 5 years ago

The for-in loop over the NodeList now goes through the prototype chain, so we check hasOwnProperty first.

Otherwise, we get this cryptic error:

Uncaught TypeError: Cannot read property 'length' of undefined
    at MutationObserver.<anonymous> (ResizeSensor.js:282)
marcj commented 5 years ago

Thanks!

alubbe commented 5 years ago

holy cow you are fast. any chance you could publish this onto npm? My current PR is blocked because our browser tests are failing due to this bug

marcj commented 5 years ago

https://github.com/marcj/css-element-queries/releases/tag/1.1.1 && https://www.npmjs.com/package/css-element-queries/v/1.1.1

alubbe commented 5 years ago

I love you - thanks for the insane response times, you put APIs to shame ;)