mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:27:34 +00:00
LibWeb: Implement "attempt to populate the history entry's document"
Implements: https://html.spec.whatwg.org/multipage/browsing-the-web.html#attempt-to-populate-the-history-entry's-document This is going to be a replacement for `FrameLoader::load()` after switching to navigables. Brief description of `populate_session_history_entry_document`: - If navigation params have url with fetch scheme then DOM document will be populated by fetching url and parsing response. This is going to be a replacement for `FrameLoader::load(AK::URL&)`. - If url in navigation params is abort:srcdoc then DOM document will be populated by parsing HTML text passed in document resource. This is going to be a replacement for `FrameLoader::load_html()`
This commit is contained in:
parent
804af38a96
commit
de2c016556
5 changed files with 238 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/HistoryHandlingBehavior.h>
|
||||
#include <LibWeb/HTML/POSTResource.h>
|
||||
#include <LibWeb/HTML/SourceSnapshotParams.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -60,6 +61,8 @@ public:
|
|||
|
||||
Variant<Empty, Traversal, String> ongoing_navigation() const { return m_ongoing_navigation; }
|
||||
|
||||
WebIDL::ExceptionOr<void> populate_session_history_entry_document(JS::GCPtr<SessionHistoryEntry>, Optional<NavigationParams>, Optional<String> navigation_id, SourceSnapshotParams const&, Function<void()>);
|
||||
|
||||
WebIDL::ExceptionOr<void> navigate(
|
||||
AK::URL const&,
|
||||
JS::NonnullGCPtr<DOM::Document> source_document,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue