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

WebDriver: Introduce a WebDriverEndpoints class

This holds the Functions used by the WebDriver to not clutter up the
`Tab.h` file.
This commit is contained in:
Tobias Christiansen 2022-10-20 20:07:10 +02:00 committed by Linus Groh
parent 354a845d65
commit c11462f40e
4 changed files with 51 additions and 24 deletions

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2022, Tobias Christiansen <tobyase@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <AK/Function.h>
#include <LibWeb/Forward.h>
namespace Browser {
class WebDriverEndpoints {
public:
WebDriverEndpoints() = default;
~WebDriverEndpoints() = default;
Function<Optional<i32>()> on_get_document_element;
Function<Optional<Vector<i32>>(i32 start_node_id, String const&)> on_query_selector_all;
Function<Optional<String>(i32 element_id, String const&)> on_get_element_attribute;
Function<Optional<String>(i32 element_id, String const&)> on_get_element_property;
Function<String()> on_get_active_documents_type;
Function<String(i32 element_id, String const&)> on_get_computed_value_for_element;
};
}