• Skip to main content
  • Skip to search
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web 开发技术
  2. Web API 接口参考
  3. notification
  4. Notification.onshow
  • Change language
  • View in English

Table of contents

  • Summary
  • Syntax
  • Specifications
  • Browser compatibility
  • See also

Notification.onshow

Summary

Notification 接口的onshow属性指定一个事件侦听器来接收 show事件。

当一个 Notification 显示时,会发生这些事件。

Syntax

Notification.onshow = function() { ... };

Specifications

This event handler is no longer listed in the Notifications API spec.

Browser compatibility

BCD tables only load in the browser

See also

  • Notification
  • Using the Notifications API

Last modified: Mar 23, 2019, by MDN contributors

Change your language

Related Topics

  1. Notifications API
  2. Notification
  3. Constructor
    1. Notification()
  4. 属性
    1. actions
    2. badge
    3. body
    4. data
    5. dir
    6. icon
    7. image
    8. lang
    9. maxActions
    10. onclick
    11. onclose
    12. onerror
    13. onshow
    14. permission
    15. 这是一个实验性的 API,请尽量不要在生产环境中使用它。 renotify
    16. requireInteraction
    17. silent
    18. tag
    19. timestamp
    20. title
    21. vibrate
  5. 方法
    1. close()
    2. requestPermission()
  6. 继承
    1. EventTarget
  7. Related pages for Web Notifications
    1. NotificationEvent
    2. ServiceWorkerGlobalScope.onnotificationclick
    3. ServiceWorkerRegistration.getNotifications()
    4. ServiceWorkerRegistration.showNotification()
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

Mozilla

© 2005-2021 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies