Manually resizing an element does not trigger a mutation observer in Chrome

I have a DIV with resize: both style, and then I set up MutationObserver that listens for attribute changes.

 mutObs = new MutationObserver(function () { console.log('Hello'); }); elem = document.getElementById('aDiv'); mutObs.observe(elem, { attributes: true }); elem.style.width = '300px'; //this fires the observer callback as expected 

I made a fiddle: http://jsfiddle.net/2NQQu/2/

In Chrome (I tested Chrome 31), the callback does not start when the DIV resized with the mouse. It works great in Firefox.

Is this behavior intentional and / or standard? This is mistake?

+5
javascript html google-chrome resize mutation-observers
source share
1 answer

This is a bug in Chrome, reported here . The error is still open, which means that it has not been fixed.

+7
source share

All Articles