r/javascript • • Mar 18 '19

What's your favorite, most useful javascript one-liner?

385 Upvotes

422 comments sorted by

View all comments

Show parent comments

5

u/kichien Mar 19 '19

Chrome dev tools - select element, right click on the element in the inspector, select "Break on" > "subtree modifications". Then you can click on the element and see it's focused state attributes in the inspector.

1

u/SarahC Mar 19 '19

Ooooooooooo...

1

u/greeniq Mar 28 '19

I've had problem with that solution multiple times, mainly with some sort of libraries that appends every time a new DOM elements (complicated ones), and setTimeout + debbuger was always helpful then ;)