Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6b83c15

Browse files
committed
docs: remove outdated docs
1 parent d2a5a6f commit 6b83c15

File tree

3 files changed

+96
-229
lines changed

3 files changed

+96
-229
lines changed

bom/notification.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,18 @@ modifiedOn: 2014-05-06
88

99
## 概述
1010

11-
Notification API是浏览器的通知接口,用于在用户的桌面(而不是网页上)显示通知信息,桌面电脑和手机都适用,比如通知用户收到了一封Email。具体的实现形式由浏览器自行部署,对于手机来说,一般显示在顶部的通知栏。
11+
Notification API 是浏览器的通知接口,用于在用户的桌面(而不是网页上)显示通知信息,桌面电脑和手机都适用,比如通知用户收到了一封 Email。具体的实现形式由浏览器自行部署,对于手机来说,一般显示在顶部的通知栏。
1212

1313
如果网页代码调用这个API,浏览器会询问用户是否接受。只有在用户同意的情况下,通知信息才会显示。
1414

15-
下面的代码用于检查浏览器是否支持这个API
15+
下面的代码用于检查浏览器是否支持这个 API
1616

1717
```javascript
18-
1918
if (window.Notification) {
2019
// 支持
2120
} else {
2221
// 不支持
2322
}
24-
2523
```
2624

2725
目前,Chrome和Firefox在桌面端部署了这个API,Firefox和Blackberry在手机端部署了这个API。
@@ -80,30 +78,28 @@ var notification = new Notification(title, options);
8078

8179
Notification构造函数的title属性是必须的,用来指定通知的标题,格式为字符串。options属性是可选的,格式为一个对象,用来设定各种设置。该对象的属性如下:
8280

83-
- dir:文字方向,可能的值为auto、ltr(从左到右)和rtl(从右到左),一般是继承浏览器的设置。
84-
- lang:使用的语种,比如en-US、zh-CN。
81+
- dir:文字方向,可能的值为 auto、ltr(从左到右)和rtl(从右到左),一般是继承浏览器的设置。
82+
- lang:使用的语种,比如 en-US、zh-CN。
8583
- body:通知内容,格式为字符串,用来进一步说明通知的目的。。
86-
- tag:通知的ID,格式为字符串。一组相同tag的通知,不会同时显示,只会在用户关闭前一个通知后,在原位置显示。
87-
- icon:图表的URL,用来显示在通知上。
84+
- tag:通知的 ID,格式为字符串。一组相同tag的通知,不会同时显示,只会在用户关闭前一个通知后,在原位置显示。
85+
- icon:图标的 URL,用来显示在通知上。
8886

8987
上面这些属性,都是可读写的。
9088

9189
下面是一个生成Notification实例对象的例子。
9290

9391
```javascript
94-
9592
var notification = new Notification('收到新邮件', {
9693
body: '您总共有3封未读邮件。'
9794
});
9895

9996
notification.title // "收到新邮件"
10097
notification.body // "您总共有3封未读邮件。"
101-
10298
```
10399

104100
### 实例对象的事件
105101

106-
Notification实例会触发以下事件
102+
Notification 实例会触发以下事件
107103

108104
- show:通知显示给用户时触发。
109105
- click:用户点击通知时触发。

index.md

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -75,79 +75,7 @@ modifiedOn: 2014-05-18
7575
- [同源政策](bom/same-origin.html)
7676
- [Ajax](bom/ajax.html)
7777
- [CORS](bom/cors.html)
78-
- [IndexedDB:浏览器端数据库](bom/indexeddb.html)
79-
- [Web Notification API](bom/notification.html)
80-
- [Performance API](bom/performance.html)
81-
- [移动设备API](bom/mobile.html)
82-
83-
<h2 id="htmlapi">Web API</h2>
84-
85-
- [概述](htmlapi/elements.html)
86-
- [Canvas](htmlapi/canvas.html)
87-
- [SVG图像](htmlapi/svg.html)
88-
- [表单](htmlapi/form.html)
89-
- [文件与二进制数据的操作](htmlapi/file.html)
90-
- [Web Worker](htmlapi/webworker.html)
91-
- [Page Visiblity](htmlapi/pagevisibility.html)
92-
- [FullScreen API:全屏操作](htmlapi/fullscreen.html)
93-
- [Web Speech](htmlapi/webspeech.html)
94-
- [requestAnimationFrame](htmlapi/requestanimationframe.html)
95-
- [WebSocket](htmlapi/websocket.html)
96-
- [Server-Sent Events](htmlapi/eventsource.html)
97-
- [WebRTC](htmlapi/webrtc.html)
98-
- [Web Components](htmlapi/webcomponents.html)
99-
100-
---
101-
102-
<h2 id="library">废稿</h2>
103-
104-
- [Underscore.js](library/underscore.html)
105-
- [Modernizr](library/modernizr.html)
106-
- [Datejs](library/datejs.html)
107-
- [D3.js](library/d3.html)
108-
- [设计模式](library/designpattern.html)
109-
- [排序算法](library/sorting.html)
110-
- [PhantomJS](tool/phantomjs.html)
111-
- [Bower:客户端库管理工具](tool/bower.html)
112-
- [Grunt:任务自动管理工具](tool/grunt.html)
113-
- [RequireJS和AMD规范](tool/requirejs.html)
114-
- [Lint工具](tool/lint.html)
115-
- [MVC模式和Backbone.js](advanced/backbonejs.html)
116-
- [Gulp:任务自动管理工具](tool/gulp.html)
117-
- [Browserify:浏览器加载Node.js模块](tool/browserify.html)
118-
- [JavaScript 测试](tool/testing.html)
119-
- [Source map](tool/sourcemap.html)
120-
- [有限状态机](advanced/fsm.html)
121-
122-
<h2 id="jquery">草稿:jQuery</h2>
123-
124-
- [概述](jquery/basic.html)
125-
- [工具方法](jquery/utility.html)
126-
- [插件开发](jquery/plugin.html)
127-
- [deferred对象](jquery/deferred.html)
128-
- [如何做到jQuery-free?](jquery/jquery-free.html)
129-
130-
<h2 id="nodejs">草稿:Node.js</h2>
131-
132-
- [概述](nodejs/basic.html)
133-
- [Module](nodejs/module.html)
134-
- [package.json文件](nodejs/packagejson.html)
135-
- [npm模块管理器](nodejs/npm.html)
136-
- [fs模块](nodejs/fs.html)
137-
- [path模块](nodejs/path.html)
138-
- [process对象](nodejs/process.html)
139-
- [Buffer对象](nodejs/buffer.html)
140-
- [Events模块](nodejs/events.html)
141-
- [Stream接口](nodejs/stream.html)
142-
- [Child Process模块](nodejs/child-process.html)
143-
- [Http模块](nodejs/http.html)
144-
- [assert模块](nodejs/assert.html)
145-
- [Cluster模块](nodejs/cluster.html)
146-
- [OS模块](nodejs/os.html)
147-
- [Net模块和DNS模块](nodejs/net.html)
148-
- [Express框架](nodejs/express.html)
149-
- [Koa框架](nodejs/koa.html)
150-
78+
:
15179
{% comment %}
15280

15381
{% if site.posts.size != 0 %}

0 commit comments

Comments
 (0)