简体   繁体   中英

Browsers push notification get text

Is there any possibility to get notification text from browser push notification via javascript? What do I need is to set timeout function and check notification text. Or maybe subscribe on event of notification if it is possible.

This is not possible. There is currently no event for when a notification is shown, and no event for fetching the current notifications are shown.

All the events for the notification are based off the notification object that is created when initializing the notification (ie. var noty = new Notification('testing'); ). If you do not have access to this object, then you wont be able to fetch the text.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM