mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
LibWeb: Add Storage interface and window.localStorage
This is a naive-but-somewhat-functional initial implementation of HTML Storage. Note that there is no persistence yet, everything is in-process only, and one local Storage object per origin.
This commit is contained in:
parent
a856cf8d4c
commit
47979996e8
10 changed files with 250 additions and 6 deletions
11
Userland/Libraries/LibWeb/HTML/Storage.idl
Normal file
11
Userland/Libraries/LibWeb/HTML/Storage.idl
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Exposed=Window]
|
||||
interface Storage {
|
||||
|
||||
readonly attribute unsigned long length;
|
||||
DOMString? key(unsigned long index);
|
||||
getter DOMString? getItem(DOMString key);
|
||||
setter undefined setItem(DOMString key, DOMString value);
|
||||
deleter undefined removeItem(DOMString key);
|
||||
undefined clear();
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue