Guest User

Untitled

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