6

I have a DIV with style resize: both and then I set a MutationObserver that listens for changes in attributes.

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 is not fired when you resize the DIV with the mouse. In Firefox it works fine.

Is this behavior intentional and/or standard? Is it a bug?

Matt
  • 74,352
  • 26
  • 153
  • 180
GetFree
  • 40,278
  • 18
  • 77
  • 104

1 Answers1

7

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

Louis
  • 146,715
  • 28
  • 274
  • 320