Created
March 15, 2017 16:54
-
-
Save rpl/f317752e2706734a8da49602e2972d1f to your computer and use it in GitHub Desktop.
tabTracker snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {Management} = Cu.import("resource://gre/modules/Extension.jsm", {}); | |
.... | |
class API extends ExtensionAPI { | |
getAPI(context) { | |
const {tabTracker} = Management.global; | |
return { | |
mynamespace: { | |
mymethod(tabId) { | |
let tab = tabTracker.getTab(tabId); | |
... | |
}, | |
}, | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment