Is it possible to set up a "listener" of some sort on an HTML element such that when this element is changed (perhaps by javascript / jQuery) the javascript debugger breaks on the line of code that changed it?
When my web page loads I see a list of "li" list item of text. Initially the text is legible,however, at some point there is some javascript/ jquery code that changes the list items to scrunch up together thus no longer making as easy to read.
is it possible to sort of "guard" these list items or make them read-only so that anything that tries to change them throws an exception?
Is it possible to set up a "listener" of some sort on an HTML element such that when this element is changed (perhaps by javascript / jQuery) the javascript debugger breaks on the line of code that changed it?
When my web page loads I see a list of "li" list item of text. Initially the text is legible,however, at some point there is some javascript/ jquery code that changes the list items to scrunch up together thus no longer making as easy to read.
is it possible to sort of "guard" these list items or make them read-only so that anything that tries to change them throws an exception?
Share Improve this question asked May 13, 2013 at 23:35 user1068636user1068636 1,9497 gold badges36 silver badges63 bronze badges 1- Some browsers (notably Opera) are prone to giving a "FOUC" (Flash Of Unstyled Content) before the CSS kicks in, so the effect you're seeing may be caused by CSS, not Javascript. Try eliminating CSS before looking for a Javascript cause. – Beetroot-Beetroot Commented May 14, 2013 at 1:11
1 Answer
Reset to default 9In Chrome, you can do this by inspecting an element, and then in the Elements view, right click the DOM node you want to break on and select the desired behavior from the "Break on" menu.