javascript 行阻止 google 应用来自 运行
javascript line preventing google app from running
我有一个 google 应用 运行 非常完美,直到我添加了这个脚本:
chrome.identity.getProfileUserInfo(email){
alert(email);
}
它现在甚至不会启动。我写对了吗?
这可能不是答案,但您是否尝试过将其更改为
chrome.identity.getProfileUserInfo = function(email){ alert(email); }
除了语法错误之外,您也不能在 chrome 应用程序中使用 alert()。
来自 here.
It is also worth noting that the "alert()" function isn't supported in
Chrome packaged apps. If you need to pop a message that blocks the UI,
I would highly recommend the jQuery based blockUI plugin.
alert() 阻止 javascript 执行并扰乱流程,因此 google 为 chrome 应用程序禁用它。
我有一个 google 应用 运行 非常完美,直到我添加了这个脚本:
chrome.identity.getProfileUserInfo(email){
alert(email);
}
它现在甚至不会启动。我写对了吗?
这可能不是答案,但您是否尝试过将其更改为
chrome.identity.getProfileUserInfo = function(email){ alert(email); }
除了语法错误之外,您也不能在 chrome 应用程序中使用 alert()。
来自 here.
It is also worth noting that the "alert()" function isn't supported in Chrome packaged apps. If you need to pop a message that blocks the UI, I would highly recommend the jQuery based blockUI plugin.
alert() 阻止 javascript 执行并扰乱流程,因此 google 为 chrome 应用程序禁用它。