-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Introduce wrapper for sessionStorage (#1108)
See Core Feature 91738 See #1082
- Loading branch information
1 parent
b5aa1be
commit 2d324b6
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ be used by extensions. | |
Modals | ||
MultiStepWizard | ||
DocumentService | ||
SessionStorageWrapper |
25 changes: 25 additions & 0 deletions
25
Documentation/ApiOverview/JavaScript/Modules/SessionStorageWrapper.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.. include:: /Includes.rst.txt | ||
|
||
.. _modules-sessionstorage: | ||
|
||
====================== | ||
SessionStorage Wrapper | ||
====================== | ||
|
||
TYPO3 ships a module acting as a wrapper for :js:`sessionStorage`. It | ||
behaves similar to the :js:`localStorage`, except that the stored data is dropped | ||
after the browser session has ended. | ||
|
||
The module :js:`TYPO3/CMS/Core/Storage/BrowserSession` allows | ||
to store data in the :js:`sessionStorage`. | ||
|
||
API Methods | ||
----------- | ||
|
||
* `get(key)` To fetch the data behind the key. | ||
* `set(key, value)` To set/override a key with any arbitrary content. | ||
* `isset(key)` (bool) checks if the key is in use. | ||
* `unset(key)` To remove a key from the storage. | ||
* `clear()` to empty all data inside the storage. | ||
* `unsetByPrefix(prefix)` to empty all data inside the storage with their keys | ||
starting with a prefix |