嗨,我想向浏览器发送推送通知。所以我使用了OneSignal。
var OneSignal = OneSignal || [];
OneSignal.push(["init", {
appId : "xxxxxxx",
autoRegister : false, /* Set to true to automatically prompt visitors */
subdomainName : "https://foxtaxi.onesignal.com",
notifyButton : {
enable: true /* Set to false to hide */
}
}]);
OneSignal.push(function() {
OneSignal.once("init", function(event) {
alert("hhh");
});
});
但是我遇到了Uncaught TypeError: OneSignal.once is not a function的问题。如果有人知道,请帮助我。