Search code examples
firefoxfirebugvimperator

View elements using javascript codes in vimperator?


I tried to use a command like this in Vimperator:

echo document.getElementsByTagName("p"); 

To view nodes whose tag name is <p> in vimperator. However, the result is like this:

enter image description here

I also tried the same command in Firebug. Following is the result:

enter image description here

While Vimperator's result is empty, Firebug's is not empty. Does anyone know why Vimperator echoes the Collection whose length is zero?


Solution

  • See the related question: How do I getElementByID in Vimperator?. The short answer is to use echo window.content.window.document.getElementsByTagName("p") instead.