mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibWeb: Add fields to SessionHistoryEntry required by Navigation API
This commit is contained in:
parent
cf0ffc12cc
commit
6856634ebc
2 changed files with 28 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Crypto/Crypto.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/DocumentState.h>
|
||||
#include <LibWeb/HTML/SessionHistoryEntry.h>
|
||||
|
@ -17,4 +18,12 @@ void SessionHistoryEntry::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(original_source_browsing_context);
|
||||
}
|
||||
|
||||
SessionHistoryEntry::SessionHistoryEntry()
|
||||
: classic_history_api_state(MUST(structured_serialize_for_storage(vm(), JS::js_null())))
|
||||
, navigation_api_state(MUST(structured_serialize_for_storage(vm(), JS::js_undefined())))
|
||||
, navigation_api_key(MUST(Crypto::generate_random_uuid()))
|
||||
, navigation_api_id(MUST(Crypto::generate_random_uuid()))
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue