【发布时间】:2020-09-04 05:56:18
【问题描述】:
我正在尝试将 Google Chrome 应用程序转换为 Web 应用程序。除了遇到一个问题,我已经制作了所有的网络应用程序。在它说的代码中,
`chrome.system.storage.getInfo(function(info){
console.log(info);
if(info[0].name == "MICROBIT" && info[0].type == "removable"){
document.getElementById("bit?").innerHTML= " YES!";
document.getElementById("bit?").style.color = "green";
}
else{
document.getElementById("bit?").innerHTML= " NOPE!";
document.getElementById("bit?").style.color = "red";
}
});`
除非您在浏览器中,否则这不起作用,因为您无权访问“chrome.system.storage”。有没有办法访问它?
谢谢
【问题讨论】:
标签: javascript html css google-chrome web-applications