1
我想通過https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/panel中的建議去使用contentScript更新面板中的內容。目前,我有一臺服務器返回我想在我的面板中顯示的HTML。我做panel.postMessage("update_panel", contents);
當我有響應準備,並與包含在Firefox擴展中更新面板內容
self.port.on("update_panel", handleMessage);
function handleMessage(message) {
document.write(message);
}
不過,我沒有看到任何更新面板相關的contentScriptFile,我也無法調試contentScriptFile(是有辦法做到這一點?)。
我在做什麼錯?