문제

I've just started using Timeline.js and I want to change the class of a header from start to whatever. However, the class is set dynamically somewhere in the Timeline library. I've searched through the source code, but it's a bit hard to understand all the connections.

My question is simply: is there a way to see where in the Javascript code an element was created/manipulated/had a class added to it, using the Chrome console?

This is what I've tried so far:

dir($('.start'))
도움이 되었습니까?

해결책

On the Elements panel, right click the element, Break on... > Attribute modifications.

I doubt you can refine the breakpoint to only break on classname changes, but it should be a good starting point.

You can't directly break when the node is created i think, but you can break when the paren't subtree changes (from the same menu). Again, it's not exactly what you need, but it's close enough to get you started.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top