首页 > 其他分享 >Chrome extension异常 chrome.runtime.sendMessage() called from a webpage must specify an Extension ID (

Chrome extension异常 chrome.runtime.sendMessage() called from a webpage must specify an Extension ID (

时间:2022-12-30 00:45:15浏览次数:48  
标签:Extension extension webpage argument sendMessage runtime its string

Uncaught TypeError: Error in invocation of runtime.sendMessage(optional string extensionId, any message, optional object options, optional function callback): chrome.runtime.sendMessage() called from a webpage must specify an Extension ID (string) for its first argument.
at <anonymous>:1:16

这个异常的原因sendMessage需要等待页面加载完成,应当在页面加载完成后再行调用

标签:Extension,extension,webpage,argument,sendMessage,runtime,its,string
From: https://www.cnblogs.com/leoric/p/17013909.html

相关文章