mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:47:35 +00:00
LibWeb: Start fleshing out Navigable::choose_a_navigable()
Equivalent of `choose_a_browsing_context` for navigables.
This commit is contained in:
parent
473848be0e
commit
2cbc9a6642
2 changed files with 65 additions and 0 deletions
|
@ -9,9 +9,11 @@
|
|||
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/ActivateTab.h>
|
||||
#include <LibWeb/HTML/HistoryHandlingBehavior.h>
|
||||
#include <LibWeb/HTML/POSTResource.h>
|
||||
#include <LibWeb/HTML/SourceSnapshotParams.h>
|
||||
#include <LibWeb/HTML/TokenizedFeatures.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -63,6 +65,19 @@ public:
|
|||
JS::GCPtr<TraversableNavigable> traversable_navigable() const;
|
||||
JS::GCPtr<TraversableNavigable> top_level_traversable();
|
||||
|
||||
enum class WindowType {
|
||||
ExistingOrNone,
|
||||
NewAndUnrestricted,
|
||||
NewWithNoOpener,
|
||||
};
|
||||
|
||||
struct ChosenNavigable {
|
||||
JS::GCPtr<Navigable> navigable;
|
||||
WindowType window_type;
|
||||
};
|
||||
|
||||
ChosenNavigable choose_a_navigable(StringView name, TokenizedFeature::NoOpener no_opener, ActivateTab = ActivateTab::Yes);
|
||||
|
||||
static JS::GCPtr<Navigable> navigable_with_active_document(JS::NonnullGCPtr<DOM::Document>);
|
||||
|
||||
enum class Traversal {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue