小编lug*_*ger的帖子

无法调用未定义的chrome-extension方法'create'

当我完成我的chrome扩展时,我发现它是一个错误:

 Uncaught TypeError: Cannot call method 'create' of undefined chrome-extension://dpfgkakomehcgdcnigflmkcfngeaamlc/js/background.js:46
Run Code Online (Sandbox Code Playgroud)

injectScript startLiveReload init

我用它就是这个

mainfest.json"background":{"scripts":["js/background.js"]}

和background.js一样

var readMenuItemId = chrome.contextMenus.create({
  "title" : "????",
  "type" : "normal",
  contexts : [ "selection" ],
  documentUrlPatterns: ["http://*/*", "https://*/*"],
  "onclick" : genericOnClick
});
Run Code Online (Sandbox Code Playgroud)

我不知道哪里出错了

google-chrome-extension

3
推荐指数
1
解决办法
3658
查看次数

标签 统计

google-chrome-extension ×1