Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onPageLoad: function(aEvent) {
- var doc = aEvent.originalTarget; // doc is document that triggered the event
- var win = document.defaultView; // win is the window for the doc
- var jsLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
- jsLoader.loadSubScript("chrome://myExt/content/jquery-1.8.0.js");
- if($("#id1").length>0) // length is always 0
- // do something
- var x = document.getElementById("id1"); //plain old javascript and it works
Add Comment
Please, Sign In to add comment