📜  chrome 扩展后台脚本 oninstall 未触发 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:48.852000             🧑  作者: Mango

代码示例1
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
    }
});