Ich versuche, eine Firefox-Erweiterung zu erstellen (meine erste Erweiterung, damit ich Anfänger bin). Ich wollte dieses Beispiel tun:Firefox-Erweiterung mit Symbolleiste
Aber das ist mein Ergebnis:
Ich kann nicht verstehen, warum meine Bilder sind nicht geladen, warum der Rahmen auf der rechten Seite von Die Schaltflächen sind leer und es war möglich, die Höhe der Symbolleiste zu erhöhen.
Es ist mein Code:
index.js:
var { ActionButton } = require('sdk/ui/button/action');
var { Toolbar } = require("sdk/ui/toolbar");
var { Frame } = require("sdk/ui/frame");
var previous = ActionButton({
id: "previous",
label: "previous",
icon: {
"16": "./icons/previous.png"
},
onClick: function(state) {
console.log("button '" + state.label + "' was clicked");
}
});
var next = ActionButton({
id: "next",
label: "next",
icon: {
"16": "./icons/next.png"
},
onClick: function(state) {
console.log("button '" + state.label + "' was clicked");
}
});
var play = ActionButton({
id: "play",
label: "play",
icon: {
"16": "./icons/play.png"
},
onClick: function(state) {
console.log("button '" + state.label + "' was clicked");
}
});
var frame = new Frame({
url: "./frame-player.html"
});
var toolbar = Toolbar({
title: "Player",
items: [previous, play, next, frame]
});
rahmen player.html:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
TEST
</body>
</html>