diff options
author | Timothy Flynn <trflynn89@pm.me> | 2022-11-10 09:25:53 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-11-10 17:02:11 +0000 |
commit | 3c00d0e92b070e8336ea5be97ee044e0a2fda443 (patch) | |
tree | 15a4ae7dea03bc4d827a0630aa77af8a666fa267 /Userland/Services/WebContent/ConnectionFromClient.cpp | |
parent | 1bc94e135ff03cc8e949842c4b73442da9696164 (diff) | |
download | serenity-3c00d0e92b070e8336ea5be97ee044e0a2fda443.zip |
Browser+WebContent+WebDriver: Move Get Element Property to WebContent
Diffstat (limited to 'Userland/Services/WebContent/ConnectionFromClient.cpp')
-rw-r--r-- | Userland/Services/WebContent/ConnectionFromClient.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
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<String> {}; - - auto property_or_error = element->get(name); - if (property_or_error.is_throw_completion()) - return Optional<String> {}; - - auto property = property_or_error.release_value(); - - if (property.is_undefined()) - return Optional<String> {}; - - auto string_or_error = property.to_string(element->vm()); - if (string_or_error.is_error()) - return Optional<String> {}; - - return { string_or_error.release_value() }; -} - Messages::WebContentServer::GetActiveDocumentsTypeResponse ConnectionFromClient::get_active_documents_type() { auto* active_document = page().top_level_browsing_context().active_document(); |