chrome.runtime.sendMessage not working in Chrome Extension

后端 未结 2 871
名媛妹妹
名媛妹妹 2021-01-04 13:01

I am trying to create a new extension. I was able to use the chrome.runtime.sendMessage function a while back but right now, I have tried everything and it still is not able

2条回答
  •  迷失自我
    2021-01-04 13:18

    Per the text at the end of https://developer.chrome.com/extensions/messaging#simple if you return true from onMessage handler in background.js then you can call sendResponse asynchronously.

提交回复
热议问题