Manipulating the dom of two separate html documents displayed in two separate kinds in enyo app

Not sure if the title makes any sense...
I am displaying html content in two different panels. I'm trying to parse out content from one html document using something like: var paras = document.getElementsByTagName("p");
but its interacting with both documents. How do I target only one at a time.
Assume the content is attached in two elements named doc1 and doc2.


  • Unless you're working with frames, you're likely only working with one document in your app. Each panel isn't a separate document but rather a DOM subtree within the same document. As a result, calls on document will interact with all nodes in every panel.

    What you probably want to use is querySelectorAll(selector) on the panel node.
Sign In or Register to comment.