mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb+WebContent: Move element reference WebDriver AOs to a helper file
These will be needed outside of WebDriverConnection.cpp.
This commit is contained in:
parent
5fc51b2ff9
commit
2dc8cad785
Notes:
github-actions[bot]
2024-09-14 23:57:26 +00:00
Author: https://github.com/trflynn89
Commit: 2dc8cad785
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1403
Reviewed-by: https://github.com/tcl3 ✅
4 changed files with 154 additions and 113 deletions
25
Userland/Libraries/LibWeb/WebDriver/ElementReference.h
Normal file
25
Userland/Libraries/LibWeb/WebDriver/ElementReference.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/Error.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebDriver/Error.h>
|
||||
|
||||
namespace Web::WebDriver {
|
||||
|
||||
ByteString get_or_create_a_web_element_reference(Web::DOM::Node const& element);
|
||||
JsonObject web_element_reference_object(Web::DOM::Node const& element);
|
||||
ErrorOr<Web::DOM::Element*, Web::WebDriver::Error> get_known_connected_element(StringView element_id);
|
||||
|
||||
ByteString get_or_create_a_shadow_root_reference(Web::DOM::ShadowRoot const& shadow_root);
|
||||
JsonObject shadow_root_reference_object(Web::DOM::ShadowRoot const& shadow_root);
|
||||
ErrorOr<Web::DOM::ShadowRoot*, Web::WebDriver::Error> get_known_shadow_root(StringView shadow_id);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue