mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb: Implement NavigatorStorage mixin interface
Co-authored-by: Tim Flynn <trflynn89@serenityos.org>
This commit is contained in:
parent
1b84062c74
commit
e3b3041a0c
Notes:
github-actions[bot]
2024-08-16 15:23:10 +00:00
Author: https://github.com/jamierocks
Commit: e3b3041a0c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1066
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/trflynn89 ✅
12 changed files with 93 additions and 3 deletions
22
Userland/Libraries/LibWeb/StorageAPI/NavigatorStorage.cpp
Normal file
22
Userland/Libraries/LibWeb/StorageAPI/NavigatorStorage.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
|
||||
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
#include <LibWeb/StorageAPI/NavigatorStorage.h>
|
||||
#include <LibWeb/StorageAPI/StorageManager.h>
|
||||
|
||||
namespace Web::StorageAPI {
|
||||
|
||||
// https://storage.spec.whatwg.org/#dom-navigatorstorage-storage
|
||||
JS::NonnullGCPtr<StorageManager> NavigatorStorage::storage()
|
||||
{
|
||||
// The storage getter steps are to return this’s relevant settings object’s StorageManager object.
|
||||
return HTML::relevant_settings_object(this_navigator_storage_object()).storage_manager();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue