Skip to content

Instantly share code, notes, and snippets.

@wbamberg
Created June 19, 2015 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wbamberg/0ed8cfa6d3bc4fc2235f to your computer and use it in GitHub Desktop.
Save wbamberg/0ed8cfa6d3bc4fc2235f to your computer and use it in GitHub Desktop.
let {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {});
function listen() {
WebRequest.onSendHeaders.addListener(listener, {}, ["requestHeaders"]);
}
function listener(e) {
console.log("onSendHeaders");
console.log(e);
}
function unlisten() {
WebRequest.onSendHeaders.removeListener(listener);
}
@zoghal
Copy link

zoghal commented Aug 21, 2015

Hi
I try use this code in FireFox 42.0a2, but in console error i got have a this error:
screenshot 2015-08-21 16 48 53

it is bug? or API has changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment