我正在写个人扩展程序,无法添加background-page.html
。
如果我将"page": "background_page.html"
添加到background
属性中,则在尝试加载扩展名时收到以下错误:
Reading manifest: Error processing background.scripts: An unexpected property was found in the WebExtension manifest.
这是我的manifest.json
代码:
{
"manifest_version": 2,
"name": "test",
"version": "1",
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["jquery-3.4.1.min.js", "content_script.js"]
}
],
"background": {
"scripts": ["background_script.js"],
"page": "background_page.html"
}
}
这里奇怪的是,它说background.scripts
存在错误,但实际上是background.page
存在错误。