From 1109132f09d75da9a28b649c7677bb6ce07c40c0 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:45 -0500 Subject: initial commit --- files/he/web/api/storage/clear/index.html | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/he/web/api/storage/clear/index.html (limited to 'files/he/web/api/storage/clear') diff --git a/files/he/web/api/storage/clear/index.html b/files/he/web/api/storage/clear/index.html new file mode 100644 index 0000000000..f93b7cf4a4 --- /dev/null +++ b/files/he/web/api/storage/clear/index.html @@ -0,0 +1,52 @@ +--- +title: Storage.clear() +slug: Web/API/Storage/clear +translation_of: Web/API/Storage/clear +--- +

{{APIRef("Web Storage API")}}

+ +

פונקציית ()clear מאפשרת לנקות את כל המפתחות מהאחסון המקומי.

+ +

תחביר

+ +
storage.clear();
+ +

ערך חוזר

+ +

undefined.

+ +

דוגמאות

+ +

הפונקציה הבאה יוצרת שלושה פריטים באחסון המקומי, ולאחר מכן מוחקת אותם.

+ +
function populateStorage() {
+  localStorage.setItem('bgcolor', 'red');
+  localStorage.setItem('font', 'Helvetica');
+  localStorage.setItem('image', 'miGato.png');
+
+  localStorage.clear();
+}
+
+ +

מפרט

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'webstorage.html#dom-storage-clear', 'Storage.clear')}}{{Spec2('HTML WHATWG')}} 
+ +

תאימות דפדפן

+ + + +

{{Compat("api.Storage.clear")}}

-- cgit v1.2.3-54-g00ecf