Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/385.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 手动调整图元的大小不会';t在铬中激发突变观察者_Javascript_Html_Google Chrome_Resize_Mutation Observers - Fatal编程技术网

Javascript 手动调整图元的大小不会';t在铬中激发突变观察者

Javascript 手动调整图元的大小不会';t在铬中激发突变观察者,javascript,html,google-chrome,resize,mutation-observers,Javascript,Html,Google Chrome,Resize,Mutation Observers,我有一个DIV,样式为resize:all,然后我设置了一个MutationObserver,用于侦听属性的更改 mutObs = new MutationObserver(function () { console.log('Hello'); }); elem = document.getElementById('aDiv'); mutObs.observe(elem, { attributes: true }); elem.style.width = '300px'; /

我有一个
DIV
,样式为
resize:all
,然后我设置了一个
MutationObserver
,用于侦听属性的更改

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
我拉了一把小提琴:

在Chrome(我测试了Chrome 31)中,当您用鼠标调整
DIV
大小时,不会触发回调。在Firefox中,它运行良好


这种行为是故意的和/或标准的吗?这是一个bug吗?

这是Chrome中的bug。该漏洞仍然存在,这意味着它尚未被修复。

于2013年9月20日首次报告为漏洞,但它仍然是一个未解决的问题。现在已修复。