diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/navigatorstorage/storage | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/navigatorstorage/storage')
-rw-r--r-- | files/zh-cn/web/api/navigatorstorage/storage/index.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/navigatorstorage/storage/index.html b/files/zh-cn/web/api/navigatorstorage/storage/index.html new file mode 100644 index 0000000000..631ec750bf --- /dev/null +++ b/files/zh-cn/web/api/navigatorstorage/storage/index.html @@ -0,0 +1,58 @@ +--- +title: NavigatorStorage.storage +slug: Web/API/NavigatorStorage/storage +tags: + - API + - Navigator + - WorkerNavigator + - 存储 + - 安全上下文 + - 属性 +translation_of: Web/API/NavigatorStorage/storage +--- +<p>{{securecontext_header}}{{APIRef("Storage")}}</p> + +<p><span class="seoSummary"> <code><strong>NavigatorStorage.storage</strong></code> 是一个只读属性,返回单例 {{domxref("StorageManager")}} 对象,用于访问当前网站或应用程序的浏览器整体存储功能的。 </span>通过返回的对象,您可以检查和配置数据存储的持久性,并了解您的浏览器使用的大约多少空间用于本地存储。</p> + +<h2 id="语法">语法</h2> + +<pre class="syntaxbox">var <em>storageManager</em> = navigator.storage; +</pre> + +<h3 id="返回值">返回值</h3> + +<p>返回 {{domxref("StorageManager")}} 您可以用来维护数据的持久化存储,以及大致确定有多少空间来存储数据。</p> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('Storage', '#navigatorstorage', 'navigator.storage')}}</td> + <td>{{Spec2('Storage')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<div> +<div class="hidden">此页面上的兼容性表格由结构化数据生成。 如果您想为数据做出贡献,请查看 <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> 并提交 pull request.</div> + +<p>{{Compat("api.NavigatorStorage.storage")}}</p> +</div> + +<h2 id="相关链接">相关链接</h2> + +<ul> + <li>{{domxref("NavigatorStorage")}}</li> + <li>{{domxref("StorageManager")}}</li> + <li>{{domxref("Navigator")}}</li> + <li>{{domxref("WorkerNavigator")}}</li> +</ul> |