mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb+WebContent: Rename the WebDriver get-known-element AO
The underlying concept is the same, but this method was renamed in the spec to drop the word "connected".
This commit is contained in:
parent
a96a762305
commit
022e2b8a94
Notes:
github-actions[bot]
2024-10-18 07:46:06 +00:00
Author: https://github.com/trflynn89
Commit: 022e2b8a94
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1850
Reviewed-by: https://github.com/gmta ✅
3 changed files with 22 additions and 22 deletions
|
@ -64,7 +64,7 @@ ErrorOr<JS::NonnullGCPtr<Web::DOM::Element>, WebDriver::Error> deserialize_web_e
|
|||
auto reference = extract_web_element_reference(object);
|
||||
|
||||
// 3. Let element be the result of trying to get a known element with session and reference.
|
||||
auto element = TRY(get_known_connected_element(reference));
|
||||
auto element = TRY(get_known_element(reference));
|
||||
|
||||
// 4. Return success with data element.
|
||||
return *element;
|
||||
|
@ -90,14 +90,14 @@ ErrorOr<JS::NonnullGCPtr<Web::DOM::Element>, Web::WebDriver::Error> get_web_elem
|
|||
// 1. Assert: browsing context is the current browsing context.
|
||||
|
||||
// 2. Let element be equal to the result of trying to get a known element with session and origin.
|
||||
auto element = TRY(get_known_connected_element(origin));
|
||||
auto element = TRY(get_known_element(origin));
|
||||
|
||||
// 3. Return success with data element.
|
||||
return element;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/webdriver/#dfn-get-a-known-element
|
||||
ErrorOr<JS::NonnullGCPtr<Web::DOM::Element>, Web::WebDriver::Error> get_known_connected_element(StringView element_id)
|
||||
ErrorOr<JS::NonnullGCPtr<Web::DOM::Element>, Web::WebDriver::Error> get_known_element(StringView element_id)
|
||||
{
|
||||
// NOTE: The whole concept of "connected elements" is not implemented yet. See get_or_create_a_web_element_reference().
|
||||
// For now the element is only represented by its ID.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue