Files
Jamie Mansfield ce7cbe3baa LibWeb: Implement NavigatorStorage mixin interface
Co-authored-by: Tim Flynn <[email protected]>
(cherry picked from commit e3b3041a0c87f4cfd6d7941963452c3c9428b487)
2024-11-01 18:23:28 -04:00

23 lines
716 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* Copyright (c) 2024, Jamie Mansfield <[email protected]>
* Copyright (c) 2024, Tim Flynn <[email protected]>
*
* 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();
}
}