From 76f46763d8d7f3974eaa59944a177b85797e42cb Mon Sep 17 00:00:00 2001 From: ruanyf Date: Wed, 1 Sep 2021 14:43:33 +0800 Subject: [PATCH 01/50] docs(bom/indexedDB): edit IDBCursor --- docs/bom/indexeddb.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/bom/indexeddb.md b/docs/bom/indexeddb.md index 83b5a86..7472264 100644 --- a/docs/bom/indexeddb.md +++ b/docs/bom/indexeddb.md @@ -932,15 +932,14 @@ objectStore.openCursor(null, 'next').onsuccess = function(event) { var cursor = event.target.result; if (cursor) { var listItem = document.createElement('li'); - listItem.innerHTML = cursor.value.albumTitle + ', ' + cursor.value.year; - list.appendChild(listItem); + listItem.innerHTML = cursor.value.albumTitle + ', ' + cursor.value.year; + list.appendChild(listItem); - console.log(cursor.source); - cursor.continue(); - } else { - console.log('Entries all displayed.'); - } - }; + console.log(cursor.source); + cursor.continue(); + } else { + console.log('Entries all displayed.'); + } }; ``` From 9d3c01a61c3e9331d1c140c2a092d5b52f897a39 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Wed, 1 Sep 2021 15:28:25 +0800 Subject: [PATCH 02/50] docs(elements/video): edit HTMLMediaElement.src --- docs/elements/video.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/elements/video.md b/docs/elements/video.md index 1625b70..73be5d6 100644 --- a/docs/elements/video.md +++ b/docs/elements/video.md @@ -56,7 +56,7 @@ - HTMLMediaElement.readyState:整数,表示媒体文件的准备状态,可能的值为0(没有任何数据)、1(已获取元数据)、2(可播放当前帧,但不足以播放多个帧)、3(可以播放多帧,至少为两帧)、4(可以流畅播放)。该属性只读。 - HTMLMediaElement.seekable:返回一个 TimeRanges 对象,表示一个用户可以搜索的媒体内容范围。该属性只读。 - HTMLMediaElement.seeking:布尔值,表示媒体文件是否正在寻找新位置。该属性只读。 -- HTMLMediaElement.src:布尔值,表示媒体文件的 URL,对应 HTML 属性`src`。 +- HTMLMediaElement.src:字符串,表示媒体文件所在的 URL,对应 HTML 属性`src`。 - HTMLMediaElement.srcObject:返回`src`属性对应的媒体文件资源,可能是`MediaStream`、`MediaSource`、`Blob`或`File`对象。直接指定这个属性,就可以播放媒体文件。 - HTMLMediaElement.textTracks:返回一个类似数组的对象,包含所有文本轨道。该属性只读。 - HTMLMediaElement.videoTracks:返回一个类似数组的对象,包含多有视频轨道。该属性只读。 From 4ba7e4048ad15c0a9cb0394d188ec897790dd128 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sun, 5 Sep 2021 10:54:24 +0800 Subject: [PATCH 03/50] refactor: edit theme --- .gitignore | 1 + package-lock.json | 246 +++++++++++++++++++++++++--------------------- package.json | 4 +- 3 files changed, 136 insertions(+), 115 deletions(-) diff --git a/.gitignore b/.gitignore index c5ea0d4..01a7204 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ dist/ npm-debug.log +package-lock.json diff --git a/package-lock.json b/package-lock.json index 5c9e66e..9afdca7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -82,9 +82,9 @@ } }, "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==" }, "@types/parse-json": { "version": "4.0.0", @@ -275,9 +275,9 @@ "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==" }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "requires": { "ms": "2.1.2" }, @@ -305,29 +305,29 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, "dom-serializer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz", - "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", "requires": { "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", + "domhandler": "^4.2.0", "entities": "^2.0.0" }, "dependencies": { "domhandler": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", - "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", + "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", "requires": { - "domelementtype": "^2.1.0" + "domelementtype": "^2.2.0" } } } }, "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" }, "domhandler": { "version": "3.3.0", @@ -338,21 +338,21 @@ } }, "domutils": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.4.4.tgz", - "integrity": "sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", "requires": { "dom-serializer": "^1.0.1", - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0" + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" }, "dependencies": { "domhandler": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", - "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz", + "integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==", "requires": { - "domelementtype": "^2.1.0" + "domelementtype": "^2.2.0" } } } @@ -368,9 +368,9 @@ "integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==" }, "emoji-regex": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-6.1.1.tgz", - "integrity": "sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4=" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "encodeurl": { "version": "1.0.2", @@ -383,9 +383,9 @@ "integrity": "sha512-VWU0/zXzVbeJNXvME/5EmLuEj2TauvoaTz6aFYK1Z92JCBlDlZ3Gu0tuGR42kpW1754ywTs+QB0g5TP0oj9Zaw==" }, "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" }, "error-ex": { "version": "1.3.2", @@ -531,12 +531,9 @@ } }, "github-slugger": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.3.0.tgz", - "integrity": "sha512-gwJScWVNhFYSRDvURk/8yhcFBee6aFjye2a7Lhb2bUyRulpIoek9p0I9Kt7PT67d/nUlZbFu8L9RLiA0woQN8Q==", - "requires": { - "emoji-regex": ">=6.0.0 <=6.1.1" - } + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.4.0.tgz", + "integrity": "sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ==" }, "glob": { "version": "7.1.7", @@ -579,9 +576,9 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, "highlight.js": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.5.0.tgz", - "integrity": "sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw==" + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==" }, "html-minifier": { "version": "4.0.0", @@ -725,6 +722,11 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -787,11 +789,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "requires": { - "chalk": "^4.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, "log4js": { @@ -807,38 +810,38 @@ } }, "loppo": { - "version": "0.6.23", - "resolved": "https://registry.npmjs.org/loppo/-/loppo-0.6.23.tgz", - "integrity": "sha512-PVlL8OH3Vwu8Rjm+S6DAPtFCgFW8SwfSlr+MAkTCL6iBrilQpcnFOp1t5pkwxPF6cLE5Z1Fm9IyzG2G/MeS0rQ==", + "version": "0.6.24", + "resolved": "https://registry.npmjs.org/loppo/-/loppo-0.6.24.tgz", + "integrity": "sha512-o3AH9yD+hiRyj/NZQBeeSYWotLTLcNMvv19OQCPc+Qay6LlGFOF1VhXfqTV0MfJoyWFnA2S3AqLYmc5toChPBQ==", "requires": { "connect": "^3.7.0", - "debug": "^4.3.1", - "fs-extra": "^9.0.1", + "debug": "^4.3.2", + "fs-extra": "^9.1.0", "html-minifier": "4.x", "html-to-text": "6.x", "js-yaml": "^3.14.1", - "lodash": "^4.17.20", - "log-symbols": "4.x", + "lodash": "^4.17.21", + "log-symbols": "^4.1.0", "log4js": "^6.3.0", "loppo-theme-oceandeep": "2.x", "promptly": "^3.2.0", "serve-static": "^1.14.1", - "tarim": "^0.1.2", - "turpan": "^0.3.1", + "tarim": "^0.1.4", + "turpan": "^0.3.2", "walk-sync": "^2.2.0", "wordcount": "^1.1.1", "yargs": "^16.2.0" }, "dependencies": { "fs-extra": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", - "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "requires": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", - "universalify": "^1.0.0" + "universalify": "^2.0.0" } }, "jsonfile": { @@ -848,19 +851,12 @@ "requires": { "graceful-fs": "^4.1.6", "universalify": "^2.0.0" - }, - "dependencies": { - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" - } } }, "universalify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" } } }, @@ -870,9 +866,9 @@ "integrity": "sha1-Mswjj72pUEpmZVTkbZdlh8LA9Ww=" }, "loppo-theme-wangdoc": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/loppo-theme-wangdoc/-/loppo-theme-wangdoc-0.5.2.tgz", - "integrity": "sha512-IkRaTMb5rg4AUHIoLCOkv3zYtJtn7NnUui70c3uR0LHKJGRy2vNru+NjOOxsIAns1I8FnEew3F4Hktex+RiFxw==" + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/loppo-theme-wangdoc/-/loppo-theme-wangdoc-0.6.1.tgz", + "integrity": "sha512-68pQdYI3eqWdypLQU8hMCDqw0btJmtTOd/3pBhec8q33Cr0/CyCLOXeRLnnIowMJV++MMnarS02zD2liX4k38w==" }, "lower-case": { "version": "1.1.4", @@ -888,9 +884,9 @@ } }, "markdown-it": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.0.4.tgz", - "integrity": "sha512-34RwOXZT8kyuOJy25oJNJoulO8L0bTHYWXcdZBYZqFnjIy3NgjeoM3FmPXIOFQ26/lSHYMr8oc62B6adxXcb3Q==", + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.2.0.tgz", + "integrity": "sha512-Wjws+uCrVQRqOoJvze4HCqkKl1AsSh95iFAeQDwnyfxM09divCBSXlDR1uTvyUP3Grzpn4Ru8GeCxYPM8vkCQg==", "requires": { "argparse": "^2.0.1", "entities": "~2.1.0", @@ -903,6 +899,11 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" } } }, @@ -927,9 +928,9 @@ "integrity": "sha512-39j7/9vP/CPCKbEI44oV8yoPJTpvfeReTn/COgRhSpNrjWF3PfP/JUxxB0hxV6ynOY8KH8Y8aX9NMDdo6z+6YQ==" }, "markdown-it-footnote": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.2.tgz", - "integrity": "sha512-JVW6fCmZWjvMdDQSbOT3nnOQtd9iAXmw7hTSh26+v42BnvXeVyGMDBm5b/EZocMed2MbCAHiTX632vY0FyGB8A==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz", + "integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==" }, "markdown-it-implicit-figures": { "version": "0.10.0", @@ -1189,9 +1190,9 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, "rfdc": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.4.tgz", - "integrity": "sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" }, "semver": { "version": "6.3.0", @@ -1304,20 +1305,13 @@ } }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - } } }, "strip-ansi": { @@ -1345,12 +1339,38 @@ } }, "tarim": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/tarim/-/tarim-0.1.3.tgz", - "integrity": "sha512-VPB0U1YV1fBAmADwuTDVKCqEeSJmzuZvl53CyWOOJCWxp2BsHNnGLX5VuginSTUjBuD3LC2Tkv5JJDYi4iv8fA==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/tarim/-/tarim-0.1.4.tgz", + "integrity": "sha512-bDkkMrALJ3L99MSInkjeyIb2BxeVUksA8Ps2ogVhaloo+6CGtVwMYinMfnju2Us2kNrEL+UY9BJS82dM+JXbdA==", "requires": { - "fs-extra": "8.x", + "fs-extra": "10.x", "lodash": "^4.17.14" + }, + "dependencies": { + "fs-extra": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + } } }, "toidentifier": { @@ -1367,28 +1387,28 @@ } }, "turpan": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/turpan/-/turpan-0.3.1.tgz", - "integrity": "sha512-jL6AMHTA2yExzbSoZTRinbWPzf9nvQfVFk0V6JlBTIbPCKMbAfgXRFHZuOFe6ZXm6+LE6s3jypNRNXkAY2yKaw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/turpan/-/turpan-0.3.2.tgz", + "integrity": "sha512-NbjUvtMTvt1jqDdTZLpCZA6c3R0Zcd59cwKIohd4+XhEr+s/Nui/KOfytKA+ba/IVw3puAwzawkgrJtL5o29Gw==", "requires": { "@iktakahiro/markdown-it-katex": "^4.0.1", "clone": "^2.1.1", - "github-slugger": "^1.1.1", - "highlight.js": "^10.4.1", - "markdown-it": "^12.0.1", + "github-slugger": "^1.4.0", + "highlight.js": "^10.7.3", + "markdown-it": "^12.2.0", "markdown-it-abbr": "^1.0.4", "markdown-it-container": "^3.0.0", "markdown-it-deflist": "^2.0.1", "markdown-it-emoji": "^2.0.0", - "markdown-it-footnote": "^3.0.1", + "markdown-it-footnote": "^3.0.3", "markdown-it-implicit-figures": "^0.10.0", "markdown-it-imsize": "^2.0.1", - "markdown-it-ins": "^3.0.0", - "markdown-it-mark": "^3.0.0", + "markdown-it-ins": "^3.0.1", + "markdown-it-mark": "^3.0.1", "markdown-it-sub": "^1.0.0", "markdown-it-sup": "^1.0.0", "markdown-it-task-lists": "^2.1.1", - "yargs": "^16.1.1" + "yargs": "^16.2.0" } }, "uc.micro": { @@ -1397,9 +1417,9 @@ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" }, "uglify-js": { - "version": "3.12.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.4.tgz", - "integrity": "sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==" + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.1.tgz", + "integrity": "sha512-JhS3hmcVaXlp/xSo3PKY5R0JqKs5M3IV+exdLHW99qKvKivPO4Z8qbej6mte17SOPqAOVMjt/XGgWacnFSzM3g==" }, "universalify": { "version": "0.1.2", @@ -1466,9 +1486,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "y18n": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", - "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, "yaml": { "version": "1.10.0", @@ -1490,9 +1510,9 @@ } }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" }, "yocto-queue": { "version": "0.1.0", diff --git a/package.json b/package.json index acd23bc..b67124a 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "dependencies": { "gh-pages": "^3.2.3", "husky": "^4.3.8", - "loppo": "^0.6.23", - "loppo-theme-wangdoc": "^0.5.2" + "loppo": "^0.6.24", + "loppo-theme-wangdoc": "^0.6.1" } } From 53ae0a3d6b72d534ac54b7d1fe17ac5aff96ae1a Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sat, 11 Sep 2021 19:43:39 +0800 Subject: [PATCH 04/50] docs(types/array): edit array hole --- docs/types/array.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/types/array.md b/docs/types/array.md index 6f9d054..94944bf 100644 --- a/docs/types/array.md +++ b/docs/types/array.md @@ -303,7 +303,7 @@ var a = [1, , 1]; a.length // 3 ``` -上面代码表明,数组的空位不影响`length`属性。 +上面代码表明,数组的空位不影响`length`属性。虽然这个位置没有值,引擎依然认为这个位置是有效的。 需要注意的是,如果最后一个元素后面有逗号,并不会产生空位。也就是说,有没有这个逗号,结果都是一样的。 From b924c7d95cd4888eee18e5d527b30edad034660d Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sun, 19 Sep 2021 19:42:50 +0800 Subject: [PATCH 05/50] docs(bom/cookie): edit cookie --- docs/bom/cookie.md | 28 ++++++++++++++++++++-------- docs/bom/same-origin.md | 4 ++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/docs/bom/cookie.md b/docs/bom/cookie.md index 9c7f53b..a9ba47b 100644 --- a/docs/bom/cookie.md +++ b/docs/bom/cookie.md @@ -4,13 +4,15 @@ Cookie 是服务器保存在浏览器的一小段文本信息,一般大小不能超过4KB。浏览器每次向服务器发出请求,就会自动附上这段信息。 -Cookie 主要保存状态信息,以下是一些主要用途。 +HTTP 协议不带有状态,有些请求需要区分状态,就通过 Cookie 附带字符串,让服务器返回不一样的回应。举例来说,用户登录以后,服务器往往会在网站上留下一个 Cookie,记录用户编号(比如`id=1234`),以后每次浏览器向服务器请求数据,就会带上这个字符串,服务器从而知道是谁在请求,应该回应什么内容。 -- 对话(session)管理:保存登录、购物车等需要记录的信息。 +Cookie 的目的就是区分用户,以及放置状态信息,它的使用场景主要如下。 + +- 对话(session)管理:保存登录状态、购物车等需要记录的信息。 - 个性化信息:保存用户的偏好,比如网页的字体大小、背景色等等。 - 追踪用户:记录和分析用户行为。 -Cookie 不是一种理想的客户端储存机制。它的容量很小(4KB),缺乏数据操作接口,而且会影响性能。客户端储存应该使用 Web storage API 和 IndexedDB。只有那些每次请求都需要让服务器知道的信息,才应该放在 Cookie 里面。 +Cookie 不是一种理想的客户端存储机制。它的容量很小(4KB),缺乏数据操作接口,而且会影响性能。客户端存储建议使用 Web storage API 和 IndexedDB。只有那些每次请求都需要让服务器知道的信息,才应该放在 Cookie 里面。 每个 Cookie 都有以下几方面的元数据。 @@ -20,7 +22,9 @@ Cookie 不是一种理想的客户端储存机制。它的容量很小(4KB) - 所属域名(默认为当前域名) - 生效的路径(默认为当前网址) -举例来说,用户访问网址`www.example.com`,服务器在浏览器写入一个 Cookie。这个 Cookie 的所属域名为`www.example.com`,生效路径为根路径`/`。如果 Cookie 的生效路径设为`/forums`,那么这个 Cookie 只有在访问`www.example.com/forums`及其子路径时才有效。以后,浏览器访问某个路径之前,就会找出对该域名和路径有效,并且还没有到期的 Cookie,一起发送给服务器。 +举例来说,用户访问网址`www.example.com`,服务器在浏览器写入一个 Cookie。这个 Cookie 的所属域名为`www.example.com`,生效路径为根路径`/`。 + +如果 Cookie 的生效路径设为`/forums`,那么这个 Cookie 只有在访问`www.example.com/forums`及其子路径时才有效。以后,浏览器访问某个路径之前,就会找出对该域名和路径有效,并且还没有到期的 Cookie,一起发送给服务器。 用户可以设置浏览器不接受 Cookie,也可以设置不向服务器发送 Cookie。`window.navigator.cookieEnabled`属性返回一个布尔值,表示浏览器是否打开 Cookie 功能。 @@ -34,9 +38,17 @@ window.navigator.cookieEnabled // true document.cookie // "id=foo;key=bar" ``` -不同浏览器对 Cookie 数量和大小的限制,是不一样的。一般来说,单个域名设置的 Cookie 不应超过30个,每个 Cookie 的大小不能超过4KB。超过限制以后,Cookie 将被忽略,不会被设置。 +不同浏览器对 Cookie 数量和大小的限制,是不一样的。一般来说,单个域名设置的 Cookie 不应超过30个,每个 Cookie 的大小不能超过 4KB。超过限制以后,Cookie 将被忽略,不会被设置。 + +Cookie 是按照域名区分的,`foo.com`只能读取自己放置的 Cookie,无法读取其他网站(比如`bar.com`)放置的 Cookie。一般情况下,一级域名也不能读取二级域名留下的 Cookie,比如`mydomain.com`不能读取`subdomain.mydomain.com`设置的 Cookie。但是有一个例外,设置 Cookie 的时候(不管是一级域名设置的,还是二级域名设置的),明确将`domain`属性设为一级域名,则这个域名下面的各级域名可以共享这个 Cookie。 + +```http +Set-Cookie: name=value; domain=mydomain.com +``` + +上面示例中,设置 Cookie 时,`domain`属性设为`mydomain.com`,那么各级的子域名和一级域名都可以读取这个 Cookie。 -浏览器的同源政策规定,两个网址只要域名相同,就可以共享 Cookie(参见《同源政策》一章)。注意,这里不要求协议相同。也就是说,`http://example.com`设置的 Cookie,可以被`https://example.com`读取。 +注意,区分 Cookie 时不考虑协议和端口。也就是说,`http://example.com`设置的 Cookie,可以被`https://example.com`或`http://example.com:8080`读取。 ## Cookie 与 HTTP 协议 @@ -197,7 +209,7 @@ Set-Cookie:id=a3fWa; ``` -用户一旦被诱骗发送这个表单,银行网站就会收到带有正确 Cookie 的请求。为了防止这种攻击,表单一般都带有一个随机 token,告诉服务器这是真实请求。 +用户一旦被诱骗发送这个表单,银行网站就会收到带有正确 Cookie 的请求。为了防止这种攻击,官网的表单一般都带有一个随机 token,官网服务器通过验证这个随机 token,确认是否为真实请求。 ```html
@@ -206,7 +218,7 @@ Set-Cookie:id=a3fWa;
``` -这种第三方网站引导发出的 Cookie,就称为第三方 Cookie。它除了用于 CSRF 攻击,还可以用于用户追踪。比如,Facebook 在第三方网站插入一张看不见的图片。 +这种第三方网站引导而附带发送的 Cookie,就称为第三方 Cookie。它除了用于 CSRF 攻击,还可以用于用户追踪。比如,Facebook 在第三方网站插入一张看不见的图片。 ```html diff --git a/docs/bom/same-origin.md b/docs/bom/same-origin.md index 553dc39..50577ce 100644 --- a/docs/bom/same-origin.md +++ b/docs/bom/same-origin.md @@ -89,10 +89,10 @@ var allCookie = document.cookie; 注意,这种方法只适用于 Cookie 和 iframe 窗口,LocalStorage 和 IndexedDB 无法通过这种方法,规避同源政策,而要使用下文介绍 PostMessage API。 -另外,服务器也可以在设置 Cookie 的时候,指定 Cookie 的所属域名为一级域名,比如`.example.com`。 +另外,服务器也可以在设置 Cookie 的时候,指定 Cookie 的所属域名为一级域名,比如`example.com`。 ```http -Set-Cookie: key=value; domain=.example.com; path=/ +Set-Cookie: key=value; domain=example.com; path=/ ``` 这样的话,二级域名和三级域名不用做任何设置,都可以读取这个 Cookie。 From cca8027372b16df27213976106d23e74a3ea3387 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Mon, 27 Sep 2021 13:00:21 +0800 Subject: [PATCH 06/50] docs(bom/navigator): edit text --- docs/bom/navigator.md | 6 +++--- docs/dom/css.md | 2 +- package-lock.json | 30 +++++++++++++++--------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/bom/navigator.md b/docs/bom/navigator.md index 0a92794..18476a7 100644 --- a/docs/bom/navigator.md +++ b/docs/bom/navigator.md @@ -6,7 +6,7 @@ ### Navigator.userAgent -`navigator.userAgent`属性返回浏览器的 User Agent 字符串,表示浏览器的厂商和版本信息。 +`navigator.userAgent`属性返回浏览器的 User Agent 字符串,表示用户设备信息,包含了浏览器的厂商、版本、操作系统等信息。 下面是 Chrome 浏览器的`userAgent`。 @@ -22,7 +22,7 @@ navigator.userAgent ```javascript var ua = navigator.userAgent.toLowerCase(); -if (/mobi/i.test(ua)) { +if (/mobi/.test(ua)) { // 手机浏览器 } else { // 非手机浏览器 @@ -32,7 +32,7 @@ if (/mobi/i.test(ua)) { 如果想要识别所有移动设备的浏览器,可以测试更多的特征字符串。 ```javascript -/mobi|android|touch|mini/i.test(ua) +/mobi|android|touch|mini/.test(ua) ``` ### Navigator.plugins diff --git a/docs/dom/css.md b/docs/dom/css.md index a29de76..5a1d39a 100644 --- a/docs/dom/css.md +++ b/docs/dom/css.md @@ -749,7 +749,7 @@ styleSheet.cssRules[0].conditionText ### 基本用法 -`window.matchMedia`方法用来将 CSS 的[`MediaQuery`](https://developer.mozilla.org/en-US/docs/DOM/Using_media_queries_from_code)条件语句,转换成一个 MediaQueryList 实例。 +`window.matchMedia()`方法用来将 CSS 的[`Media Query`](https://developer.mozilla.org/en-US/docs/DOM/Using_media_queries_from_code)条件语句,转换成一个 MediaQueryList 实例。 ```javascript var mdl = window.matchMedia('(min-width: 400px)'); diff --git a/package-lock.json b/package-lock.json index 9afdca7..8a03e78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -92,9 +92,9 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "4.3.0", @@ -139,9 +139,9 @@ "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "brace-expansion": { "version": "1.1.11", @@ -460,9 +460,9 @@ } }, "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "requires": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -561,9 +561,9 @@ } }, "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" }, "has-flag": { "version": "4.0.0", @@ -1417,9 +1417,9 @@ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" }, "uglify-js": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.1.tgz", - "integrity": "sha512-JhS3hmcVaXlp/xSo3PKY5R0JqKs5M3IV+exdLHW99qKvKivPO4Z8qbej6mte17SOPqAOVMjt/XGgWacnFSzM3g==" + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz", + "integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==" }, "universalify": { "version": "0.1.2", From 5fd3d345454d69762958a934369e906a0ebd3dbd Mon Sep 17 00:00:00 2001 From: ruanyf Date: Mon, 4 Oct 2021 23:43:13 +0800 Subject: [PATCH 07/50] docs(bom/cookie): edit domain property --- docs/bom/cookie.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/bom/cookie.md b/docs/bom/cookie.md index a9ba47b..80c542c 100644 --- a/docs/bom/cookie.md +++ b/docs/bom/cookie.md @@ -175,9 +175,19 @@ Set-Cookie: id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; ### Domain,Path -`Domain`属性指定浏览器发出 HTTP 请求时,哪些域名要附带这个 Cookie。如果没有指定该属性,浏览器会默认将其设为当前域名,这时子域名将不会附带这个 Cookie。比如,`example.com`不设置 Cookie 的`domain`属性,那么`sub.example.com`将不会附带这个 Cookie。如果指定了`domain`属性,那么子域名也会附带这个 Cookie。如果服务器指定的域名不属于当前域名,浏览器会拒绝这个 Cookie。 +`Domain`属性指定 Cookie 属于哪个域名,以后浏览器向服务器发送 HTTP 请求时,通过这个属性判断是否要附带某个 Cookie。 -`Path`属性指定浏览器发出 HTTP 请求时,哪些路径要附带这个 Cookie。只要浏览器发现,`Path`属性是 HTTP 请求路径的开头一部分,就会在头信息里面带上这个 Cookie。比如,`PATH`属性是`/`,那么请求`/docs`路径也会包含该 Cookie。当然,前提是域名必须一致。 +服务器设定 Cookie 时,如果没有指定 Domain 属性,浏览器会默认将其设为浏览器的当前域名。如果当前域名是一个 IP 地址,则不得设置 Domain 属性。 + +如果指定 Domain 属性,需要遵守下面规则:Domain 属性只能是当前域名或者当前域名的上级域名,但设为上级域名时,不能设为顶级域名或公共域名。(顶级域名指的是 .com、.net 这样的域名,公共域名指的是开放给外部用户设置子域名的域名,比如 github.io。)如果不符合上面这条规则,浏览器会拒绝设置这个 Cookie。 + +举例来说,当前域名为`x.y.z.com`,那么 Domain 属性可以设为`x.y.z.com`,或者`y.z.com`,或者`z.com`,但不能设为`foo.x.y.z.com`,或者`another.domain.com`。 + +另一个例子是,当前域名为`wangdoc.github.io`,则 Domain 属性只能设为`wangdoc.github.io`,不能设为`github.io`,因为后者是一个公共域名。 + +浏览器发送 Cookie 时,Domain 属性必须与当前域名一致,或者是当前域名的上级域名(公共域名除外)。比如,Domain 属性是`y.z.com`,那么适用于`y.z.com`、`x.y.z.com`、`foo.x.y.z.com`等域名。再比如,Domain 属性是公共域名`github.io`,那么只适用于`github.io`这个域名本身,不适用于它的子域名`wangdoc.github.io`。 + +`Path`属性指定浏览器发出 HTTP 请求时,哪些路径要附带这个 Cookie。只要浏览器发现,`Path`属性是 HTTP 请求路径的开头一部分,就会在头信息里面带上这个 Cookie。比如,`Path`属性是`/`,那么请求`/docs`路径也会包含该 Cookie。当然,前提是 Domain 属性必须符合条件。 ### Secure,HttpOnly From 8ea87244214dcf50d3aec0b60920eaafabfb028d Mon Sep 17 00:00:00 2001 From: ruanyf Date: Thu, 28 Oct 2021 19:08:55 +0800 Subject: [PATCH 08/50] docs(dom/element): fixed #234 --- docs/dom/element.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/dom/element.md b/docs/dom/element.md index b569f31..2b5ea6d 100644 --- a/docs/dom/element.md +++ b/docs/dom/element.md @@ -89,7 +89,7 @@ document.documentElement.lang // "en" **(1)Element.hidden** -`Element.hidden`属性返回一个布尔值,表示当前元素的`hidden`属性,用来控制当前元素是否可见。该属性可读写。 +`Element.hidden`属性返回一个布尔值,表示当前 HTML 元素的`hidden`属性的值。该属性可读写,用来控制当前元素是否可见。 ```javascript var btn = document.getElementById('btn'); @@ -100,9 +100,9 @@ btn.addEventListener('click', function () { }, false); ``` -注意,该属性与 CSS 设置是互相独立的。CSS 对这个元素可见性的设置,`Element.hidden`并不能反映出来。也就是说,这个属性并不能用来判断当前元素的实际可见性。 +注意,该属性与 CSS 设置是互相独立的。CSS 对当前元素可见性的设置,`Element.hidden`并不能反映出来。也就是说,这个属性并不能用来判断当前元素的实际可见性。 -CSS 的设置高于`Element.hidden`。如果 CSS 指定了该元素不可见(`display: none`)或可见(`display: hidden`),那么`Element.hidden`并不能改变该元素实际的可见性。换言之,这个属性只在 CSS 没有明确设定当前元素的可见性时才有效。 +CSS 设置的优先级高于`Element.hidden`。如果 CSS 指定了该元素不可见(`display: none`)或可见(`visibility: visible`),那么`Element.hidden`并不能改变该元素实际的可见性。换言之,这个属性只在 CSS 没有明确设定当前元素的可见性时才有效。 **(2)Element.contentEditable,Element.isContentEditable** From c426ae28ced38a3e56fc18ec3215bfaf266ea1df Mon Sep 17 00:00:00 2001 From: ruanyf Date: Fri, 29 Oct 2021 08:05:50 +0800 Subject: [PATCH 09/50] docs(dom/nodelist): edit HTMLCollection.prototype.namedItem() --- docs/dom/nodelist.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/dom/nodelist.md b/docs/dom/nodelist.md index f5c9457..bda3939 100644 --- a/docs/dom/nodelist.md +++ b/docs/dom/nodelist.md @@ -179,7 +179,7 @@ var img0 = c.item(0); ### HTMLCollection.prototype.namedItem() -`namedItem`方法的参数是一个字符串,表示`id`属性或`name`属性的值,返回对应的元素节点。如果没有对应的节点,则返回`null`。 +`namedItem`方法的参数是一个字符串,表示`id`属性或`name`属性的值,返回当前集合中对应的元素节点。如果没有对应的节点,则返回`null`。 ```javascript // HTML 代码如下 @@ -188,3 +188,6 @@ var img0 = c.item(0); var pic = document.getElementById('pic'); document.images.namedItem('pic') === pic // true ``` + +`Collection.namedItem('value')`等同于`Collection['value']`。 + From 074e7f591a70b1110a22a120c9f8bf6a74788001 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Sat, 5 Feb 2022 09:04:13 +0800 Subject: [PATCH 10/50] docs(stdlib/date): fix #237 --- docs/stdlib/date.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/stdlib/date.md b/docs/stdlib/date.md index 4edbaeb..af7ad94 100644 --- a/docs/stdlib/date.md +++ b/docs/stdlib/date.md @@ -361,7 +361,7 @@ d.toLocaleTimeString('zh-CN') // "上午12:00:00" - `weekday`:可能的值为`long`、`short`、`narrow`。 - `day`、`hour`、`minute`、`second`:可能的值为`numeric`、`2-digit`。 - `timeZone`:可能的值为 IANA 的时区数据库。 -- `timeZooneName`:可能的值为`long`、`short`。 +- `timeZoneName`:可能的值为`long`、`short`。 - `hour12`:24小时周期还是12小时周期,可能的值为`true`、`false`。 下面是用法实例。 From f901426d946ba4ced8f3b0ff70bc73d01e27c382 Mon Sep 17 00:00:00 2001 From: Jim Gao Date: Tue, 1 Mar 2022 13:14:29 +0800 Subject: [PATCH 11/50] docs: fix url (#239) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix url * fix url * docs(basic/grammar): update url Update 2013-06-22: “Basic JavaScript: an introduction to the language” is an improved longer version of this post * docs(types/number): fix url * docs(types/object): remove extra word * docs(types/function): fix url * docs(operators/bit): update url * docs(features/style): fix url * docs(stdlib/date): update url * docs(oop/prototype): update url * docs(async/promise): fix url * docs(bom/engine): update url --- docs/async/promise.md | 2 +- docs/basic/grammar.md | 2 +- docs/basic/history.md | 6 +++--- docs/bom/engine.md | 2 +- docs/features/style.md | 2 +- docs/oop/prototype.md | 2 +- docs/operators/bit.md | 2 +- docs/stdlib/date.md | 4 ++-- docs/types/function.md | 2 +- docs/types/number.md | 2 +- docs/types/object.md | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/async/promise.md b/docs/async/promise.md index 68b5c07..cb629d7 100644 --- a/docs/async/promise.md +++ b/docs/async/promise.md @@ -274,7 +274,7 @@ console.log(3); ## 参考链接 -- Sebastian Porto, [Asynchronous JS: Callbacks, Listeners, Control Flow Libs and Promises](http://sporto.github.com/blog/2012/12/09/callbacks-listeners-promises/) +- Sebastian Porto, [Asynchronous JS: Callbacks, Listeners, Control Flow Libs and Promises](https://sporto.github.io/blog/2012/12/09/callbacks-listeners-promises/) - Rhys Brett-Bowen, [Promises/A+ - understanding the spec through implementation](http://modernjavascript.blogspot.com/2013/08/promisesa-understanding-by-doing.html) - Matt Podwysocki, Amanda Silver, [Asynchronous Programming in JavaScript with “Promises”](http://blogs.msdn.com/b/ie/archive/2011/09/11/asynchronous-programming-in-javascript-with-promises.aspx) - Marc Harter, [Promise A+ Implementation](https://gist.github.com//wavded/5692344) diff --git a/docs/basic/grammar.md b/docs/basic/grammar.md index 1611427..b1ebde1 100644 --- a/docs/basic/grammar.md +++ b/docs/basic/grammar.md @@ -727,4 +727,4 @@ top: ## 参考链接 -- Axel Rauschmayer, [A quick overview of JavaScript](http://www.2ality.com/2011/10/javascript-overview.html) +- Axel Rauschmayer, [Basic JavaScript for the impatient programmer](https://2ality.com/2013/06/basic-javascript.html) diff --git a/docs/basic/history.md b/docs/basic/history.md index 0c03d6d..f5c266b 100644 --- a/docs/basic/history.md +++ b/docs/basic/history.md @@ -181,7 +181,7 @@ JavaScript 伴随着互联网的发展一起发展。互联网周边技术的快 ## 参考链接 -- Axel Rauschmayer, [The Past, Present, and Future of JavaScript](http://oreilly.com/javascript/radarreports/past-present-future-javascript.csp) +- Axel Rauschmayer, [The Past, Present, and Future of JavaScript](https://www.oreilly.com/library/view/the-past-present/9781449343545/) - John Dalziel, [The race for speed part 4: The future for JavaScript](http://creativejs.com/2013/06/the-race-for-speed-part-4-the-future-for-javascript/) -- Axel Rauschmayer, [Basic JavaScript for the impatient programmer](http://www.2ality.com/2013/06/basic-javascript.html) -- resin.io, [Happy 18th Birthday JavaScript! A look at an unlikely past and bright future](http://resin.io/happy-18th-birthday-javascript/) +- Axel Rauschmayer, [Basic JavaScript for the impatient programmer](https://www.2ality.com/2013/06/basic-javascript.html) +- balena.io, [Happy 18th Birthday JavaScript! A look at an unlikely past and bright future](https://www.balena.io/blog/happy-18th-birthday-javascript/) diff --git a/docs/bom/engine.md b/docs/bom/engine.md index 86e7f53..8c0761e 100644 --- a/docs/bom/engine.md +++ b/docs/bom/engine.md @@ -436,4 +436,4 @@ JavaScript 是一种解释型语言,也就是说,它不需要编译,由解 - Axel Rauschmayer, [ECMAScript 6 promises (1/2): foundations](http://www.2ality.com/2014/09/es6-promises-foundations.html) - Daniel Imms, [async vs defer attributes](http://www.growingwiththeweb.com/2014/02/async-vs-defer-attributes.html) - Craig Buckler, [Load Non-blocking JavaScript with HTML5 Async and Defer](http://www.sitepoint.com/non-blocking-async-defer/) -- Domenico De Felice, [How browsers work](http://domenicodefelice.blogspot.sg/2015/08/how-browsers-work.html?t=2) +- Domenico De Felice, [How browsers work](https://domenicodefelice.blogspot.com/2015/08/how-browsers-work.html) diff --git a/docs/features/style.md b/docs/features/style.md index 8947aca..0ea77e1 100644 --- a/docs/features/style.md +++ b/docs/features/style.md @@ -486,7 +486,7 @@ function doAction(action) { ## 参考链接 -- Eric Elliott, Programming JavaScript Applications, [Chapter 2. JavaScript Style Guide](http://chimera.labs.oreilly.com/books/1234000000262/ch02.html), O'Reilly, 2013 +- Eric Elliott, Programming JavaScript Applications, [Chapter 2. JavaScript Style Guide](https://www.oreilly.com/library/view/programming-javascript-applications/9781491950289/), O'Reilly, 2014 - Axel Rauschmayer, [A meta style guide for JavaScript](http://www.2ality.com/2013/07/meta-style-guide.html) - Axel Rauschmayer, [Automatic semicolon insertion in JavaScript](http://www.2ality.com/2011/05/semicolon-insertion.html) - Rod Vagg, [JavaScript and Semicolons](http://dailyjs.com/2012/04/19/semicolons/) diff --git a/docs/oop/prototype.md b/docs/oop/prototype.md index 76077e2..d1ae8df 100644 --- a/docs/oop/prototype.md +++ b/docs/oop/prototype.md @@ -637,4 +637,4 @@ var module1 = (function ($, YAHOO) { ## 参考链接 -- [JavaScript Modules: A Beginner’s Guide](https://medium.freecodecamp.com/javascript-modules-a-beginner-s-guide-783f7d7a5fcc), by Preethi Kasireddy +- [JavaScript Modules: A Beginner’s Guide](https://www.freecodecamp.org/news/javascript-modules-a-beginner-s-guide-783f7d7a5fcc), by Preethi Kasireddy diff --git a/docs/operators/bit.md b/docs/operators/bit.md index edbb8b4..3c86e3d 100644 --- a/docs/operators/bit.md +++ b/docs/operators/bit.md @@ -353,6 +353,6 @@ flags = ~flags; ## 参考链接 -- Michal Budzynski, [JavaScript: The less known parts. Bitwise Operators](http://michalbe.blogspot.co.uk/2013/03/javascript-less-known-parts-bitwise.html) +- Michal Budzynski, [JavaScript: The less known parts. Bitwise Operators](https://michalbe.blogspot.com/2013/03/javascript-less-known-parts-bitwise.html) - Axel Rauschmayer, [Basic JavaScript for the impatient programmer](http://www.2ality.com/2013/06/basic-javascript.html) - Mozilla Developer Network, [Bitwise Operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators) diff --git a/docs/stdlib/date.md b/docs/stdlib/date.md index af7ad94..2b0326e 100644 --- a/docs/stdlib/date.md +++ b/docs/stdlib/date.md @@ -545,5 +545,5 @@ d // Sun Jan 06 2013 06:00:00 GMT+0800 (CST) ## 参考链接 -- Rakhitha Nimesh,[Getting Started with the Date Object](http://jspro.com/raw-javascript/beginners-guide-to-javascript-date-and-time/) -- Ilya Kantor, [Date/Time functions](http://javascript.info/tutorial/datetime-functions) +- Rakhitha Nimesh,[Getting Started with the Date Object](https://www.sitepoint.com/beginners-guide-to-javascript-date-and-time/) +- Ilya Kantor, [Date/Time functions](https://javascript.info/date) diff --git a/docs/types/function.md b/docs/types/function.md index d8e649e..ef8625f 100644 --- a/docs/types/function.md +++ b/docs/types/function.md @@ -993,7 +993,7 @@ window.eval('...') - Ben Alman, [Immediately-Invoked Function Expression (IIFE)](http://benalman.com/news/2010/11/immediately-invoked-function-expression/) - Mark Daggett, [Functions Explained](http://markdaggett.com/blog/2013/02/15/functions-explained/) -- Juriy Zaytsev, [Named function expressions demystified](http://kangax.github.com/nfe/) +- Juriy Zaytsev, [Named function expressions demystified](http://kangax.github.io/nfe/) - Marco Rogers polotek, [What is the arguments object?](http://docs.nodejitsu.com/articles/javascript-conventions/what-is-the-arguments-object) - Juriy Zaytsev, [Global eval. What are the options?](http://perfectionkills.com/global-eval-what-are-the-options/) - Axel Rauschmayer, [Evaluating JavaScript code via eval() and new Function()](http://www.2ality.com/2014/01/eval.html) diff --git a/docs/types/number.md b/docs/types/number.md index af8954e..64f0592 100644 --- a/docs/types/number.md +++ b/docs/types/number.md @@ -651,4 +651,4 @@ isFinite(-1) // true ## 参考链接 - Dr. Axel Rauschmayer, [How numbers are encoded in JavaScript](http://www.2ality.com/2012/04/number-encoding.html) -- Humphry, [JavaScript 中 Number 的一些表示上/下限](http://blog.segmentfault.com/humphry/1190000000407658) +- Humphry, [JavaScript 中 Number 的一些表示上/下限](https://segmentfault.com/a/1190000000407658) diff --git a/docs/types/object.md b/docs/types/object.md index 9e50984..3ff539c 100644 --- a/docs/types/object.md +++ b/docs/types/object.md @@ -497,5 +497,5 @@ console.log(temp.p1 + temp.p2); - Dr. Axel Rauschmayer,[Object properties in JavaScript](http://www.2ality.com/2012/10/javascript-properties.html) - Lakshan Perera, [Revisiting JavaScript Objects](http://www.laktek.com/2012/12/29/revisiting-javascript-objects/) -- Angus Croll, [The Secret Life of JavaScript Primitives](http://javascriptweblog.wordpress.com/2010/09/27/the-secret-life-of-javascript-primitives/)i +- Angus Croll, [The Secret Life of JavaScript Primitives](http://javascriptweblog.wordpress.com/2010/09/27/the-secret-life-of-javascript-primitives/) - Dr. Axel Rauschmayer, [JavaScript’s with statement and why it’s deprecated](http://www.2ality.com/2011/06/with-statement.html) From bf18144c97bae1662f72cc02ecbbf7d75093a076 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Tue, 1 Mar 2022 13:41:56 +0800 Subject: [PATCH 12/50] docs(types/function): fix #239 broken reference link --- docs/types/function.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/types/function.md b/docs/types/function.md index ef8625f..76dcbfb 100644 --- a/docs/types/function.md +++ b/docs/types/function.md @@ -992,7 +992,7 @@ window.eval('...') ## 参考链接 - Ben Alman, [Immediately-Invoked Function Expression (IIFE)](http://benalman.com/news/2010/11/immediately-invoked-function-expression/) -- Mark Daggett, [Functions Explained](http://markdaggett.com/blog/2013/02/15/functions-explained/) +- Mark Daggett, [Functions Explained](https://web.archive.org/web/20160911170816/http://markdaggett.com/blog/2013/02/15/functions-explained/) - Juriy Zaytsev, [Named function expressions demystified](http://kangax.github.io/nfe/) - Marco Rogers polotek, [What is the arguments object?](http://docs.nodejitsu.com/articles/javascript-conventions/what-is-the-arguments-object) - Juriy Zaytsev, [Global eval. What are the options?](http://perfectionkills.com/global-eval-what-are-the-options/) From b5ccb913171f73f18b8743701d37a6e1e53df0d1 Mon Sep 17 00:00:00 2001 From: hehe1111 <2908749709@qq.com> Date: Tue, 5 Apr 2022 20:50:45 +0800 Subject: [PATCH 13/50] =?UTF-8?q?=E8=B7=9F=20160=20=E8=A1=8C=E7=9A=84=20Co?= =?UTF-8?q?ntent-Type=20=E9=87=8D=E5=A4=8D=E4=BA=86=20(#241)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/bom/cors.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/bom/cors.md b/docs/bom/cors.md index 368ea0c..23dfac9 100644 --- a/docs/bom/cors.md +++ b/docs/bom/cors.md @@ -162,7 +162,6 @@ Content-Encoding: gzip Content-Length: 0 Keep-Alive: timeout=2, max=100 Connection: Keep-Alive -Content-Type: text/plain ``` 上面的 HTTP 回应中,关键的是`Access-Control-Allow-Origin`字段,表示`http://api.bob.com`可以请求数据。该字段也可以设为星号,表示同意任意跨源请求。 From c0737828d443c2fb939054417c0a22a7505f0c75 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Thu, 7 Apr 2022 13:47:00 +0800 Subject: [PATCH 14/50] docs(elements/input): edit valueAsNumber --- docs/elements/input.md | 13 +- package-lock.json | 1523 ---------------------------------------- 2 files changed, 12 insertions(+), 1524 deletions(-) delete mode 100644 package-lock.json diff --git a/docs/elements/input.md b/docs/elements/input.md index 9a04e0e..fce544a 100644 --- a/docs/elements/input.md +++ b/docs/elements/input.md @@ -75,7 +75,18 @@ - `labels`:返回一个`NodeList`实例,代表绑定当前``节点的`