Hello everyone i have an question about firefox add-on:
How i can get the body content from a tab, for example.
var content = require("tabs").activeTab.documentContent.body.innerHTML;
Thanks alot.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The Add-on SDK doesn’t allow direct access to the tab contents – the idea is that the add-on and the tab might end up living in different processes eventually. What you do is injecting a content script into the tab to get you the necessary data, something like this: