Skip to content

Instantly share code, notes, and snippets.

@wbamberg
Created February 5, 2014 19:47
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/8831590 to your computer and use it in GitHub Desktop.
Save wbamberg/8831590 to your computer and use it in GitHub Desktop.
var { ToggleButton } = require("sdk/ui/button/toggle");
var button = ToggleButton({
id: "my-button",
label: "default",
icon: {
"16": "./firefox-16.png",
"32": "./firefox-32.png"
},
onClick: updateLabelForThisWindow
});
function updateLabelForThisWindow(state) {
button.state("window", {
label: "window-specific label"
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment