1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

LibWeb: Update session history when History entry is pushed/replaced

With this change `shared_history_push_replace_state()` starts to
actually add/replace session history entry.
This commit is contained in:
Aliaksandr Kalenik 2023-09-23 23:04:24 +02:00 committed by Andrew Kaster
parent 699ead0939
commit 7cdbd59e92
6 changed files with 55 additions and 13 deletions

View file

@ -8,6 +8,7 @@
#pragma once
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/HTML/HistoryHandlingBehavior.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
namespace Web::HTML {
@ -36,11 +37,7 @@ private:
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
enum class IsPush {
No,
Yes,
};
WebIDL::ExceptionOr<void> shared_history_push_replace_state(JS::Value data, Optional<String> const& url, IsPush is_push);
WebIDL::ExceptionOr<void> shared_history_push_replace_state(JS::Value data, Optional<String> const& url, HistoryHandlingBehavior);
JS::NonnullGCPtr<DOM::Document> m_associated_document;
};