문제

I'm interested in using the html5 notifications api but have a few questions:

  1. Is it possible to customize the notification background? By default it's white but I'd like to use black with a little transparency.
  2. Is it possible to make the notification clickable? Or at least click back to the app in the Chrome browser? Or are notifications purposely not clickable?

Thanks

도움이 되었습니까?

해결책

There are two types of notifications:

  1. webkitNotifications.createNotification - this will create a generic notification that can be passed exactly three items: Title, Icon, Content
  2. webkitNotifications.createHTMLNotification - this can be passed a url to an html page that will be displayed a notification

If you want more control than createNotification offers, use createHTMLNotification and pass it a custom html page.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top