In my Firefox Addon’s overlay.xul, can I access it’s DOM in javascript? I can’t figure out how.
Thanks in advance.
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.
An overlay is merged with the DOM of the document that it applies to, it doesn’t have a DOM of its own. So you don’t access the DOM of “the overlay”, you access the DOM of the document that you overlaid. And that is being done the usual way, e.g. via
document.getElementById(). You have to consider one thing however: never access the DOM before the document finished loading, this will cause various issues (like other overlays failing to apply). So if your overlay includes a script you can write: