I have some questions about panel on the Firefox addon. How do I ajax request from panel? And How to debug panel? Firebug can’t see panel.
Share
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.
If you need to do a request to a web api from a panel, you’ll need to actually make the web request in main.js, and send the result to your panel using
Some documentation you should look at:
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/guides/content-scripts/index.html
The SDK uses an asynchronous event-driven system to send messages between objects such as a panel and the main addon code. The above guide to content scripts is a great backgrounder for how this system works.
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/addon-kit/request.html
The request module allows you to make requests to any web service.
Here is an example add-on that makes a request to the twitter api and passes the results to a page-mod:
https://builder.addons.mozilla.org/package/45866/latest/
This implementation is similar to what you would need to do to trigger an api request from a panel.