我们观察到,当禁用
chrome.extension.isAllowedFileSchemeAccess
时,为 file:///
协议下的任何本地文件注入内容脚本仅适用于本地构建,但在 chrome 商店上传时无效?
此外,在
chrome://extensions
下切换文件访问时的行为也不一致。
在本地构建中,它被调用为
update
,但在 chrome 商店上传时不会被调用。
chrome.runtime.onInstalled.addListener(function(details){
if(details.reason == "install"){
//call a function to handle a first install
}else if(details.reason == "update"){
//call a function to handle an update
}
});
这是预期的行为吗?