Created
April 24, 2018 03:25
-
-
Save bgrins/aa81b38229e90ab4102f35dfbbd27c0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var anonElements = []; | |
var walker = Cc["@mozilla.org/inspector/deep-tree-walker;1"]. | |
createInstance(Ci.inIDeepTreeWalker); | |
walker.showAnonymousContent = true; | |
walker.showSubDocuments = false; | |
walker.showDocumentsAsNodes = false; | |
walker.init(document.documentElement, NodeFilter.SHOW_ELEMENT); | |
while (walker.nextNode()) { | |
var bindingParent = document.getBindingParent(walker.currentNode); | |
if (bindingParent && document.getAnonymousNodes(bindingParent)) { | |
anonElements.push(walker.currentNode); | |
} | |
} | |
anonElements; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment