0
當我點擊小部件圖標時,如何使用contenturl刷新面板?我的代碼是在這裏簡單的是:刷新contenturl在附加sdk
var data = require("sdk/self").data;
exports.main = function() {
var panel = require("sdk/panel").Panel({
width: 400,
height: 560,
contentURL: "http://sample.com/index.html",
});
panel.on("show", function() {
panel.port.emit("show");
});
require("sdk/widget").Widget({
id: "Sample",
label: "Sample",
contentURL: data.url("icon128.png"),
panel:panel
});
};