I am currently working on an addon and it had a addon window with addon buttons and a tab in main window it maintains. I am able to open a page in main tab by
mainWindow().location = "http://murmuring-retreat-7618.herokuapp.com/signin";
I created mainWindow by following way
getBrowser().getBrowserForTab(bridge.recordingTab).contentWindow;
where I have already saved bridge.recordingTab as the tab I am connected.
but if I want to send a post request instead of just open a url, how do I do it?
If you use jQuery in your firefox addon then you could simply do a $.post
Note though that you need the destination server to be CORS enabled , otherwise you can only do JSONP
requests using $.getJSON
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.