mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 03:57:35 +00:00
LibWeb: Add window.sessionStorage
This commit is contained in:
parent
1535fe0324
commit
83eb5ac8fd
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