简体   繁体   English

哪些JS添加了内联样式?

[英]Which JS added inline styles?

is there any way to check which JS script added inline style to particular DOM element? 有什么方法可以检查哪个JS脚本向特定DOM元素添加了内联样式? I've been trying to find it manually, but I suppose there is a better way... 我一直在尝试手动找到它,但是我想有更好的方法...

If you are using chrome, you can right-click the DOM element you want to watch (in the element inspector of the dev tools), and select Break On - Attributes Modifications. 如果您使用的是chrome,则可以右键单击要观看的DOM元素(在开发工具的元素检查器中),然后选择“中断条件-属性修改”。

That's about the closest solution I know of. 那是我所知道的最接近的解决方案。

I don't think there is a "signature" for a javascript outcome on DOM so i guess you have much choice but disabling one by one your scripts. 我认为DOM上的javascript结果没有“签名”,因此我想您有很多选择,但可以逐个禁用脚本。

Other choice: make a global search with parts of the style in your text editor, it must be stocked somewhere in your code. 其他选择:在文本编辑器中使用部分样式进行全局搜索,必须将其存储在代码中的某个位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM