WIP: Use this instead of window

For @canuckistani, to allow easier integration into things like the Firefox add-ons SDK.