From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/api/navigatorstorage/storage/index.html | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 files/zh-cn/web/api/navigatorstorage/storage/index.html (limited to 'files/zh-cn/web/api/navigatorstorage/storage') 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 +--- +

{{securecontext_header}}{{APIRef("Storage")}}

+ +

 NavigatorStorage.storage 是一个只读属性,返回单例 {{domxref("StorageManager")}} 对象,用于访问当前网站或应用程序的浏览器整体存储功能的。 通过返回的对象,您可以检查和配置数据存储的持久性,并了解您的浏览器使用的大约多少空间用于本地存储。

+ +

语法

+ +
var storageManager = navigator.storage;
+
+ +

返回值

+ +

返回 {{domxref("StorageManager")}} 您可以用来维护数据的持久化存储,以及大致确定有多少空间来存储数据。

+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Storage', '#navigatorstorage', 'navigator.storage')}}{{Spec2('Storage')}}Initial definition.
+ +

浏览器兼容性

+ +
+ + +

{{Compat("api.NavigatorStorage.storage")}}

+
+ +

相关链接

+ + -- cgit v1.2.3-54-g00ecf