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.
Because JavaScript Code Modules do not have a normal browser context, I sometimes get around this by passing in a
window,document, or whatever object might pertain to what I needed (e.g., passing in thewindoworFormDataobject when you invoke a method built inside your module).However, I see this concern has already been raised by someone and there is a way around it: https://bugzilla.mozilla.org/show_bug.cgi?id=672690#c4
I believe you can always find such class/interface equivalents of browser context items, unless you need to grab a specific
windowordocument.