Which JS added inline styles?

风格不统一 提交于 2019-12-24 06:43:56

问题


is there any way to check which JS script added inline style to particular DOM element? I've been trying to find it manually, but I suppose there is a better way...


回答1:


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.

That's about the closest solution I know of.




回答2:


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.

Other choice: make a global search with parts of the style in your text editor, it must be stocked somewhere in your code.



来源:https://stackoverflow.com/questions/26997815/which-js-added-inline-styles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!