From 3c00d0e92b070e8336ea5be97ee044e0a2fda443 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 10 Nov 2022 09:25:53 -0500 Subject: Browser+WebContent+WebDriver: Move Get Element Property to WebContent --- .../Services/WebContent/ConnectionFromClient.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'Userland/Services/WebContent/ConnectionFromClient.cpp') diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp index 082d1886dd..6dcf480da2 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.cpp +++ b/Userland/Services/WebContent/ConnectionFromClient.cpp @@ -495,28 +495,6 @@ void ConnectionFromClient::scroll_element_into_view(i32 element_id) element->scroll_into_view(options); } -Messages::WebContentServer::GetElementPropertyResponse ConnectionFromClient::get_element_property(i32 element_id, String const& name) -{ - auto element = find_element_by_id(element_id); - if (!element.has_value()) - return Optional {}; - - auto property_or_error = element->get(name); - if (property_or_error.is_throw_completion()) - return Optional {}; - - auto property = property_or_error.release_value(); - - if (property.is_undefined()) - return Optional {}; - - auto string_or_error = property.to_string(element->vm()); - if (string_or_error.is_error()) - return Optional {}; - - return { string_or_error.release_value() }; -} - Messages::WebContentServer::GetActiveDocumentsTypeResponse ConnectionFromClient::get_active_documents_type() { auto* active_document = page().top_level_browsing_context().active_document(); -- cgit v1.2.3