为什么通知消息在IE11中不起作用 [英] Why notification message is not working in IE11

查看:117
本文介绍了为什么通知消息在IE11中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在IE11中显示通知消息,但不起作用.IE可以使用任何其他方法来显示通知消息.如果有人知道,请帮助找到解决方案.

I am trying to show a notification message in IE11, But not working. Any other method is there for IE to show notification messages. If anyone knows please help to find the solution.

if(!("Notification" in window)){
console.log("Browser not supported");
}else if(Notification.permission === "granted"){
 console.log("Show content for New Message");
}

推荐答案

因为IE不支持 notification API:

Because IE doesn't support the notification API:

https://developer.mozilla.org/en-US/docs/Web/API/notification#Browser_compatibility

我建议您自己放弃对IE的支持,因为即使Microsoft也不支持它.它的市场份额远低于1.5%,通常不再值得.

I'd suggest dropping support for IE, yourself, as even Microsoft no longer supports it. It's market share is way below 1.5%, no longer worth it generally.

这篇关于为什么通知消息在IE11中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆