aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/orphaned/web/api/navigatorstorage
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2021-07-09 00:38:08 +0000
committerMDN <actions@users.noreply.github.com>2021-07-09 00:38:08 +0000
commit235c34993c7b14f783fc8259cc237ac09f0d3e57 (patch)
tree7bee1bfcdc5216423bb76a12842eb60c169b0b04 /files/zh-cn/orphaned/web/api/navigatorstorage
parent635bcdc09c53e3c497a3ff8eb958ca8eb541c7fd (diff)
downloadtranslated-content-235c34993c7b14f783fc8259cc237ac09f0d3e57.tar.gz
translated-content-235c34993c7b14f783fc8259cc237ac09f0d3e57.tar.bz2
translated-content-235c34993c7b14f783fc8259cc237ac09f0d3e57.zip
[CRON] sync translated content
Diffstat (limited to 'files/zh-cn/orphaned/web/api/navigatorstorage')
-rw-r--r--files/zh-cn/orphaned/web/api/navigatorstorage/index.html71
-rw-r--r--files/zh-cn/orphaned/web/api/navigatorstorage/storage/index.html57
2 files changed, 128 insertions, 0 deletions
diff --git a/files/zh-cn/orphaned/web/api/navigatorstorage/index.html b/files/zh-cn/orphaned/web/api/navigatorstorage/index.html
new file mode 100644
index 0000000000..bc0ef8ba92
--- /dev/null
+++ b/files/zh-cn/orphaned/web/api/navigatorstorage/index.html
@@ -0,0 +1,71 @@
+---
+title: NavigatorStorage
+slug: orphaned/Web/API/NavigatorStorage
+tags:
+ - API
+ - Interface
+ - Mixin
+ - Navigator
+ - NavigatorStorage
+ - NeedsTranslation
+ - Reference
+ - Secure context
+ - Storage
+ - Storage Standard
+ - TopicStub
+ - WorkerNavigator
+translation_of: Web/API/NavigatorStorage
+original_slug: Web/API/NavigatorStorage
+---
+<p>{{securecontext_header}}{{APIRef("Storage")}}</p>
+
+<p>The <strong><code>NavigatorStorage</code></strong> {{Glossary("mixin")}} adds to the {{domxref("Navigator")}} and {{domxref("WorkerNavigator")}} interfaces the {{domxref("Navigator.storage")}} property, which provides access to the {{domxref("StorageManager")}} singleton used for controlling the persistence of data stores as well as obtaining information</p>
+
+<p>{{AvailableInWorkers}}</p>
+
+<p>There are many APIs which provide ways for Web content to store data on a user's computer, including {{Glossary("cookies")}}, the Web Storage API ({{domxref("Window.localStorage")}} and {{domxref("Window.sessionStorage")}}), and <a href="/en-US/docs/Web/API/IndexedDB_API">IndexedDB</a>. The Storage Standard is designed to serve as a common basis for the implementation of all of those APIs and storage technologies, so that their constraints and configurations can be understood and controlled using a common set of methods and properties.</p>
+
+<h2 id="Properties">Properties</h2>
+
+<dl>
+ <dt>{{domxref("NavigatorStorage.storage", "storage")}} {{readonlyinline}}{{securecontext_inline}}</dt>
+ <dd>Returns the {{domxref("StorageManager")}} singleton object which is used to access the Storage Manager. Through the returned object, you can control persistence of data stores as well as get estimates of how much space is left for your site or appliation to store data.</dd>
+</dl>
+
+<h2 id="Methods">Methods</h2>
+
+<p><em>The <code>NavigatorStorage</code></em><em> mixin has no methods.</em></p>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('Storage')}}</td>
+ <td>{{Spec2('Storage')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.NavigatorStorage")}}</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{domxref("Navigator")}}</li>
+ <li>{{domxref("navigator.storage")}}</li>
+ <li>{{domxref("WorkerNavigator")}}</li>
+ <li>{{domxref("StorageManager")}}</li>
+</ul>
diff --git a/files/zh-cn/orphaned/web/api/navigatorstorage/storage/index.html b/files/zh-cn/orphaned/web/api/navigatorstorage/storage/index.html
new file mode 100644
index 0000000000..bfd2cc93d6
--- /dev/null
+++ b/files/zh-cn/orphaned/web/api/navigatorstorage/storage/index.html
@@ -0,0 +1,57 @@
+---
+title: NavigatorStorage.storage
+slug: orphaned/Web/API/NavigatorStorage/storage
+tags:
+ - API
+ - Navigator
+ - WorkerNavigator
+ - 存储
+ - 安全上下文
+ - 属性
+translation_of: Web/API/NavigatorStorage/storage
+original_slug: 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>
+<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>