最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - get the document html elements in firefox addon - Stack Overflow

programmeradmin3浏览0评论

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
Add a ment  | 

1 Answer 1

Reset to default 6

If you want to access the current tab's content from an extension then you need to use content.document.getElementsByTagName('*') etc.

发布评论

评论列表(0)

  1. 暂无评论