Skip to content

Instantly share code, notes, and snippets.

@rhelmer
Last active September 26, 2017 20:50
Show Gist options
  • Select an option

  • Save rhelmer/3e1e3a5e996dc388fd055175313e403b to your computer and use it in GitHub Desktop.

Select an option

Save rhelmer/3e1e3a5e996dc388fd055175313e403b to your computer and use it in GitHub Desktop.
study.js
this.Study = {
onPageLoad: evt => {
console.log("caught pageload event", evt);
console.log("stuff is:", stuff);
},
init() {
this.stuff = "things";
this.win = Services.wm.getMostRecentWindow("navigator:browser");
this.win.gBrowser.addEventListener("DOMContentLoaded", this.onPageLoad);
},
uninit() {
this.win.gBrowser.removeEventListener("DOMContentLoaded", this.onPageLoad);
}
}
Study.init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment