How can I open a tab with a custom referrer in a Firefox add-on?
I guess something like that:
tab.addProperty("referer", "http://mywebsite.com/");
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.
You cannot “add” a referrer to an already open tab, the referrer needs to be specified when the tab is opened. You use
gBrowser.addTab()method for that:gBrowseris a global variable in the browser window. If you don’t have the browser window, you can use nsIWindowMediator.getMostRecentWindow() for that: