无线电上的 Chrome 断点不会触发

2024-01-11

I have a page where some JavaScript modifies a radio button to be not checked and another to be checked -- the HTML source contains the right checked attributes but when inspecting, the wrong one is checked. Also, when loading with JS off, the right one is checked. So I put a Chrome breakpoint on both for attribute modification and the breakpoints do not fire when reloading. I tried to set a breakpoint on a common parent div and it still doesn't fire. enter image description here


菲尔的评论很有帮助,但只需要一点爱。首先,选中异步复选框

在“调用堆栈”旁边的“源”选项卡中。否则你将无法获得有用的调用堆栈。然后添加这个片段:

<script>
var debugel  = document.getElementById("edit-field-slideshow-media-type-und-images");
Object.observe(debugel, function(changes) {
  console.log(changes);
  debugger;
});
</script>

在控制台和调试器之间,您有合理的机会弄清楚发生了什么。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无线电上的 Chrome 断点不会触发 的相关文章

随机推荐