Are there any JavaScript library for cross browser desktop notification?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 22:29:15

问题


I know W3C just publish their draft version of Web Notification to notify user. So, there is no browser that implement this method in their current or latest build browser.

Web Notifications Overview

After I search a lot of webs for finding all possible desktop notification in most browser.I found any 2 major browser that should support this.

1.Google Chrome and Webkit-based browser


(source: google.com)


(source: google.com)


(source: google.com)

We can use native Desktop notification function to show message like the following picture.

More infomation: The Chromium Projects - Desktop Notifications

2.Internet Explorer

For IE 5.5+, we can use createPopup function to notify use like in Google Chrome but it's much flexible more that Google Chrome.

More information: CreatePopup Method on MSDN

Moreover, if we pin website to Windows 7 taskbar, we can use overlay icon to notify user too.


(source: microsoft.com)

More information: IE9, Site Specific Browsers, and adding your own Jump List Items to Pinned Tabs

Other browser

I think we can use Pines Notify jQuery plugin to create in-browser notification.

Or do you have any desktop notification library or idea for suggesting me?

Thanks,

PS. If it does not have fine library, I will create it with myself.

Update I

Since IE8, it does not allow us to display popup outside current browser. For example, when IE is minimized, all popups are not displayed. So, Google Chrome is only one browser that has fully web notification API (FF 4 also has non-documented web notification API but it not work for now).


回答1:


These are some that I found:

  • https://github.com/alexgibson/notify.js
  • https://github.com/ttsvetko/HTML5-Desktop-Notifications



回答2:


I don't know of a cross-browser lib; but desktop-notifications are coming to Mozilla Firefox post 4.0 as well. They're implemented in trunk already: https://bugzilla.mozilla.org/show_bug.cgi?id=573588

Though apparently this new feature won't get included in FF 4.0: https://bugzilla.mozilla.org/show_bug.cgi?id=594543

But in the long term, an api related to but different from the webkit will be available.

Not sure about opera, however.




回答3:


I doubt that there are any cross-browser desktop notification javascript libraries, because those notifications are vendor specific implementations, made by the web browsers themselves, and not the W3C or WHATWG.

CreatePopup looks like it was made for enterprise web applications as it never took prominence, and Google wants web applications to replace desktop applications. Jumplists are just a way to provide Windows 7 functionality into IE9, but it's not a move to push to cloud computing.




回答4:


The dojo toolkit http://www.dojotoolkit.org contains a control called "Toaster" in its dojox package, but this is a notification inside the browser window and does not follow the web notifications specification. Maybe it is also a solution for your webapp.



来源:https://stackoverflow.com/questions/4104016/are-there-any-javascript-library-for-cross-browser-desktop-notification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!