CreateHTMLNotification () replacement

I created a Chrome extension in which it uses createHTMLNotification() to show a window on top of everything. However, starting with Chrome 28, Google decided to completely abandon createHTMLNotification() (why, Google. Why?). Suddenly I need to find a replacement.

createHTMLNotification() Let me dynamically change things in the notification. However, I do not think that the new Rich Notification allows me to do this.

Is there any work or suggestions? Thanks.

+6
source share
2 answers

With a little thought, I still didn't want to depend on the default Google layout. So I used a notification like image and put the generated canvas on it. I can draw whatever I want, and I also created a small API to update the notification whenever I want. This worked great for me.

Thanks to Google for making everything so complicated ...

+3
source

This change was actually announced correctly on the Chromium-Extensions mailing list . Apparently, there was some misunderstanding, however, in August last year it was indicated that it would remain in use for extensions, but this lasted only six months.

In any case, the official recommended replacement is the Rich Notifications API . There is no other way.

+4
source

Source: https://habr.com/ru/post/945899/


All Articles