语法错误或default_popup - chrome extension

时间:2017-12-16 05:22:21

标签: javascript html google-chrome google-chrome-extension

我正在学习如何构建Chrome扩展程序,我收到此错误消息..即使我正在观看的视频使用相同的代码。

这是我的JSON文件

{

"name": "My Extension",
"version": "1.0",
"manifest_version": 2,
"description": "This is a short description for our Chrome Extension.",
"browser_action": {
    "default_icon": "icon16.png"
    "default_popup": "popup.html"
}

}

1 个答案:

答案 0 :(得分:0)

使用以下有效{ "name": "My Extension", "version": "1.0", "manifest_version": 2, "description": "This is a short description for our Chrome Extension.", "browser_action": { "default_icon": "icon16.png", "default_popup": "popup.html" } }

    @PostMapping(value = "/", produces = MediaType.ALL_VALUE)
    public String testController(@RequestBody Map<String, String> parms) throws Exception {
        parms.forEach((k, v) -> System.out.println((k + ":" + v)));
        return "";
    }