跨浏览器的桌面通知插件 Push.js

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-02 23:42:07

软件介绍

Push.js,是一款跨浏览器的Javascript桌面通知插件。这个通知API允许在当下流行的浏览器上使用,像Chrome, Safari, Firefox,和IE 9+。可以推送一个通知到用户桌面。如果用户的浏览器不支持这个新的API,会回滚到使用旧的实现方式。

运行效果:

示例代码:

创建通知

Push.create('Hello World!')

define(['pushjs'], function (Push) {
   Push.create('Hello World!');
});

Push.count();

关闭通知

Push.create('Hello World!', {
    tag: 'foo'
});

// Somewhere later in your code...
Push.close('foo');

var promise = Push.create('Hello World!');
// Somewhere later in your code...
promise.then(function(notification) {
    notification.close();
});
Push.clear();

本文地址:https://codercto.com/soft/d/22539.html

Sass and Compass in Action

Sass and Compass in Action

Wynn Netherland、Nathan Weizenbaum、Chris Eppstein、Brandon Mathis / Manning Publications / 2013-8-2 / USD 44.99

Written by Sass and Compass creators * Complete Sass language reference * Covers prominent Compass community plug-ins * Innovative approach to creating stylesheets Cascading Style Sheets paint the we......一起来看看 《Sass and Compass in Action》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

html转js在线工具
html转js在线工具

html转js在线工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具