diff options
Diffstat (limited to 'files/fr/web/api/storagemanager/index.md')
-rw-r--r-- | files/fr/web/api/storagemanager/index.md | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/files/fr/web/api/storagemanager/index.md b/files/fr/web/api/storagemanager/index.md new file mode 100644 index 0000000000..afc0bd77ad --- /dev/null +++ b/files/fr/web/api/storagemanager/index.md @@ -0,0 +1,55 @@ +--- +title: StorageManager +slug: Web/API/StorageManager +tags: + - API + - Interface + - NeedsTranslation + - Persistence + - Quotas + - Reference + - Secure context + - Storage + - Storage API + - StorageManager + - TopicStub + - Usage +translation_of: Web/API/StorageManager +--- +<p>{{securecontext_header}}{{SeeCompatTable}}{{APIRef("Storage")}}</p> + +<p>The <strong><code>StorageManager</code></strong> interface of the the <a href="/en-US/docs/Web/API/Storage_API">Storage API</a> provides an interface for managing persistance permissions and estimating available storage. You can get a reference to this interface using either {{domxref("navigator.storage")}} or {{domxref("WorkerNavigator.storage")}}.</p> + +<h2 id="Methods">Methods</h2> + +<dl> + <dt>{{domxref("StorageManager.estimate()")}} {{securecontext_inline}}</dt> + <dd>Returns a {{domxref("StorageEstimate")}} object containing usage and quota numbers for your origin.</dd> + <dt>{{domxref("StorageManager.persist()")}} {{securecontext_inline}}</dt> + <dd>Returns a {{jsxref('Promise')}} that resolves to <code>true</code> if the user agent is able to persist your site's storage.</dd> + <dt>{{domxref("StorageManager.persisted()")}} {{securecontext_inline}}</dt> + <dd>Returns a {{jsxref('Promise')}} that resolves to <code>true</code> if persistence has already been granted for your site's storage.</dd> +</dl> + +<h2 id="Specifications">Specifications</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','#storagemanager','StorageManger')}}</td> + <td>{{Spec2('Storage')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + + + +<p>{{Compat("api.StorageManager")}}</p> |