1
DOLLOR 2020-02-20 20:43:47 +08:00
“通知权限只能从安全的上下文请求”应该是说,发送通知的代码、网页,必须在 HTTPS 环境中吧。
Chrome 也是从某个版本开始,禁止非 HTTPS 下发起的通知请求了。 |
2
iNaru 2020-02-20 21:27:37 +08:00
In Chrome and Firefox you cannot request notifications at all unless the site is a secure context (i.e. HTTPS), and you can no longer allow notification permissions to be requested from cross-origin <iframe>s.
developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API#Requesting_permission |