Hi, I use the HTML DOM Tree to visualize my DOM tree and I have a few questions:
How can I only display certain elements like : only
How can I change the root of the Graph from the BODY tag to a
Change the traverseDOM function to only include those elements that you want.
traverseDOM
See Gojs.net -> samples -> DOM Tree : Update Graph after new elements are insert - #2 by walter
You’ll note that that sample’s traverseDom function is already filtering out elements from the DOM. You can modify the function to filter out whatever you like.
traverseDom
You can call the updated traverseDom function with whatever root element you like.