1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10: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:
Andreas Kling 2022-02-08 19:38:29 +01:00
parent a856cf8d4c
commit 47979996e8
10 changed files with 250 additions and 6 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021-2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -263,6 +263,8 @@
#include <LibWeb/Bindings/SelectionPrototype.h>
#include <LibWeb/Bindings/ShadowRootConstructor.h>
#include <LibWeb/Bindings/ShadowRootPrototype.h>
#include <LibWeb/Bindings/StorageConstructor.h>
#include <LibWeb/Bindings/StoragePrototype.h>
#include <LibWeb/Bindings/StyleSheetConstructor.h>
#include <LibWeb/Bindings/StyleSheetListConstructor.h>
#include <LibWeb/Bindings/StyleSheetListPrototype.h>
@ -424,6 +426,7 @@
ADD_WINDOW_OBJECT_INTERFACE(Screen) \
ADD_WINDOW_OBJECT_INTERFACE(Selection) \
ADD_WINDOW_OBJECT_INTERFACE(ShadowRoot) \
ADD_WINDOW_OBJECT_INTERFACE(Storage) \
ADD_WINDOW_OBJECT_INTERFACE(StyleSheet) \
ADD_WINDOW_OBJECT_INTERFACE(StyleSheetList) \
ADD_WINDOW_OBJECT_INTERFACE(SubmitEvent) \