I am trying to develop a Firefox extension. The following code:
var divList = document.getElementsByTagName("div") ; Components.utils.reportError("num of divs = " + divList.length) ;
Always says: - the number of divs = 0.
I do not understand what the error is that I am making in this simple piece of code. When I replace the "div" with "*" , I always get a value of about 1100 on any web page.
source share