From a69fe5a314e53094bc4d5c658669ae9200a71d6a Mon Sep 17 00:00:00 2001 From: David Botton Date: Thu, 14 Apr 2022 16:03:37 -0400 Subject: [PATCH] Correct missing quotes on storage removeItem --- source/clog-location.lisp | 3 ++- source/clog-window.lisp | 2 +- tutorial/14-tutorial.lisp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/clog-location.lisp b/source/clog-location.lisp index ccbd0da..b01a1a1 100644 --- a/source/clog-location.lisp +++ b/source/clog-location.lisp @@ -185,7 +185,8 @@ ;;;;;;;;;;;;;;;;; (defgeneric url-replace (clog-window replace-url) - (:documentation "Replace browser url.")) + (:documentation "Replace browser url, ie a redirection and current URL not +saved in session history and back button will not return to it.")) (defmethod url-replace ((obj clog-window) replace-url) (execute obj (format nil "replace('~A')" replace-url))) diff --git a/source/clog-window.lisp b/source/clog-window.lisp index 4ca44df..bcbf769 100644 --- a/source/clog-window.lisp +++ b/source/clog-window.lisp @@ -531,7 +531,7 @@ STORAGE-TYPE. (local = persistant or session)")) STORAGE-TYPE. (local = persistant or session)")) (defmethod storage-remove ((obj clog-window) storage-type key-name) - (execute obj (format nil "~(~a~)Storage.removeItem(~A)" storage-type key-name))) + (execute obj (format nil "~(~a~)Storage.removeItem('~A')" storage-type key-name))) ;;;;;;;;;;;;;;;;;;;;; ;; storage-element ;; diff --git a/tutorial/14-tutorial.lisp b/tutorial/14-tutorial.lisp index a9dc0f2..34b04ed 100644 --- a/tutorial/14-tutorial.lisp +++ b/tutorial/14-tutorial.lisp @@ -34,7 +34,7 @@ The value of local storage persists in the browser cache even after the browser is closed. If you reset this page the session storage key will remain the same, but opening this page in another window or tab will be a new session. If the -new window came from a click from this window, the session keys (on some +new window came from a click from this window, the session keys (on some browsers are copied first to the new window, if you wish to persist data accross windows use local storage instead.