mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Add window.sessionStorage
This commit is contained in:
parent
1535fe0324
commit
83eb5ac8fd
Notes:
sideshowbarker
2024-07-17 17:38:08 +09:00
Author: https://github.com/paulwratt 🔰
Commit: 83eb5ac8fd
Pull-request: https://github.com/SerenityOS/serenity/pull/12926
Reviewed-by: https://github.com/linusg
4 changed files with 21 additions and 0 deletions
|
@ -528,6 +528,17 @@ RefPtr<HTML::Storage> Window::local_storage()
|
|||
});
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage
|
||||
RefPtr<HTML::Storage> Window::session_storage()
|
||||
{
|
||||
// FIXME: Implement according to spec.
|
||||
|
||||
static HashMap<Origin, NonnullRefPtr<HTML::Storage>> session_storage_per_origin;
|
||||
return session_storage_per_origin.ensure(associated_document().origin(), [] {
|
||||
return HTML::Storage::create();
|
||||
});
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsers.html#dom-parent
|
||||
Window* Window::parent()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue