I have a document with a debugging comment in it that looks like this:
<!--SERVER_TRACE {...}-->
Is there a way to query the DOM to access this node? I am looking for a vanilla JavaScript solution, without the aid of any libraries.
My first thought was to depth first search the DOM and compare nodes found against the node type value for comments, Node.COMMENT_NODE
. Is there an easier way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…