mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
In particular, we need to convert web element references to the actual element. The AO isn't fully implemented because we will need to work out mixing JsonValue types with JS value types, which currently isn't very straight forward with our JSON clone algorithm.
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2024, Tim Flynn <trflynn89@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/ByteString.h>
|
|
#include <AK/Error.h>
|
|
#include <AK/JsonObject.h>
|
|
#include <LibJS/Heap/GCPtr.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<JS::NonnullGCPtr<Web::DOM::Element>, WebDriver::Error> deserialize_web_element(JsonObject const&);
|
|
ByteString extract_web_element_reference(JsonObject const&);
|
|
bool represents_a_web_element(JsonValue const& value);
|
|
ErrorOr<Web::DOM::Element*, Web::WebDriver::Error> get_known_connected_element(StringView element_id);
|
|
bool is_element_stale(Web::DOM::Node const& element);
|
|
|
|
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);
|
|
|
|
}
|