Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ID strings to debugging messages referring to DOM nodes #312

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zerodogg
Copy link

Added a method to the debug object that generates an identifying string (based on id, data-sizes or class) for a DOM node.
Helps identify which nodes are bing referred to, i.e. in "Zero-height block ignored" messages, so that it's easier to figure out what the problem might be.

"Zero-height block ignored" 

becomes

 "Zero-height block ignored: [object HTMLDivElement] (data-sizes=smallarticle fallback)"

which provides a lot more to go on.

Updated for coding style, and removed useless test for id.

Can be used to help identify elementents that are being referred
to in debugging messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant