我正在开发一个firefox扩展,并收到了这个错误消息。什么意思?
我唯一的label来自:
require("sdk/ui/button/action").ActionButton({
id: "show-popup",
label: "something that can't possibly be a duplicate",
...稍后,我添加了一个背景页面:
require("sdk/page-worker").Page({
contentScript: [ ... some scripts ... ]
});在测试过程中,我得到以下错误:
> jpm run -b $(which firefox)
JPM [info] Starting jpm run on MyExtensionTitle
JPM [info] Creating a new profile
console.error: myextensiontitle:
JPM [error] Message: SyntaxError: duplicate label只有当我添加后台脚本时才会发生这种情况。如何进一步调试?我所要做的只是一个模棱两可的终端消息,而且没有行号。
发布于 2016-01-27 14:03:25
page-worker的contentScript是源代码,应该是contentScriptFile:
require("sdk/page-worker").Page({
contentScriptFile: [ ... some scripts ... ]
});https://stackoverflow.com/questions/35029914
复制相似问题