You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Js usingPlatform: p = JsForPsoup usingPlatform: p (
|
sessionLocalStorage <Alien[LocalStorage]>
|
) (
public localStorage ^<Alien[LocalStorage]> = (
(* Get a per-session storage object. These objects do not actually contain any data; they contain access methods that prefix all data with a session specific key. The data is in fact stored in the browser's regular local storage. We cache the per-session object the first time we access it. The caching itself is not too crucial, since any instance returned from the #createSessionStorage() function in Javascript will work. However, having it cached gives us the oportunity to clear the actual storage. We must clear it on startup, since we have to ensure that we always have the same initial state on all clients. This limits the utility of local storage, but provides compatibility with the normal platform. *)
sessionLocalStorage isNil ifTrue: [
(* allocate a per-session local storage object and cache it *)
sessionLocalStorage:: global createSessionStorage: sessionId.