I'm creating a firefox extension and I want to get the HTML page elements
using javascript but the document.getElementsByTagName('*')
is always giving me an xul objects array.
How can I get the HTML objects array ?
I'm creating a firefox extension and I want to get the HTML page elements
using javascript but the document.getElementsByTagName('*')
is always giving me an xul objects array.
How can I get the HTML objects array ?
Share Improve this question edited Nov 1, 2019 at 21:17 Muhamad Bhaa Asfour asked Feb 6, 2011 at 14:22 Muhamad Bhaa AsfourMuhamad Bhaa Asfour 1,0353 gold badges22 silver badges40 bronze badges 2- 1 For clarification: do you want to get references to all the documents on all currently-open pages (tabs, I guess)? – Pointy Commented Feb 6, 2011 at 14:28
- i want all the html elements in the current page as an array – Muhamad Bhaa Asfour Commented Feb 6, 2011 at 14:29
1 Answer
Reset to default 6If you want to access the current tab's content from an extension then you need to use content.document.getElementsByTagName('*')
etc.