html - firefox extension / javascript - how to access dynamically created element -
i building firefox extension modify web page content.
it simple javascript finds html element , modifies it. script executed when button on toolbar pressed.
i want access element id="precont"
content on web page created dynamically (it doesn't show when right click -> "view page source").
this returns null
(after waiting page load , executing script):
var elem = document.getelementbyid("precont");
how gain access javascript?
var elem = document.getelementbyid("precont");
returned null
because web pages document
object wasn't directly available in extension (chrome/button.js)
i gained access via current window:
var precontelem = window.content.document.getelementbyid("precont");
Comments
Post a Comment