Created
March 11, 2014 23:31
-
-
Save wbamberg/9497337 to your computer and use it in GitHub Desktop.
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
var { Frame } = require("sdk/ui/frame"); | |
var { Toolbar } = require("sdk/ui/toolbar"); | |
/* | |
<head> | |
</head> | |
<body> | |
<input id="button" type="button" value="click me"> | |
<script type="text/javascript"> | |
var button = window.document.getElementById("button"); | |
button.addEventListener("click", function() { | |
console.log("blah"); | |
}); | |
</script> | |
</body> | |
*/ | |
let datauri = "data:text/html;charset=utf-8;base64,PGhlYWQ+DQo8L2hlYWQ+DQo" + | |
"8Ym9keT4NCjxpbnB1dCBpZD0iYnV0dG9uIiB0eXBlPSJidXR0b24iIHZhbH" + | |
"VlPSJjbGljayBtZSI+DQoNCjxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2Nya" + | |
"XB0Ij4NCg0KdmFyIGJ1dHRvbiA9IHdpbmRvdy5kb2N1bWVudC5nZXRFbGVt" + | |
"ZW50QnlJZCgiYnV0dG9uIik7DQpidXR0b24uYWRkRXZlbnRMaXN0ZW5lcig" + | |
"iY2xpY2siLCBmdW5jdGlvbigpIHsNCiAgY29uc29sZS5sb2coImJsYWgiKT" + | |
"sNCn0pOw0KDQo8L3NjcmlwdD4NCjwvYm9keT4="; | |
var frame = new Frame({ | |
url: datauri | |
}); | |
const toolbar = Toolbar({ | |
id: "test", | |
title: "test", | |
items: [frame] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment