mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
Everywhere: Add deprecated_ prefix to JsonValue::to_byte_string
`JsonValue::to_byte_string` has peculiar type-erasure semantics which is not usually intended. Unfortunately, it also has a very stereotypical name which does not warn about unexpected behavior. So let's prefix it with `deprecated_` to make new code use `as_string` if it just wants to get string value or `serialized<StringBuilder>` if it needs to do proper serialization.
This commit is contained in:
parent
4ed5287792
commit
ccd701809f
20 changed files with 46 additions and 50 deletions
|
@ -323,7 +323,7 @@ Web::WebDriver::Response Client::switch_to_window(Web::WebDriver::Parameters par
|
|||
if (!handle.has_value())
|
||||
return Web::WebDriver::Error::from_code(Web::WebDriver::ErrorCode::InvalidArgument, "No property called 'handle' present");
|
||||
|
||||
return session->switch_to_window(handle->to_byte_string());
|
||||
return session->switch_to_window(handle->as_string());
|
||||
}
|
||||
|
||||
// 11.4 Get Window Handles, https://w3c.github.io/webdriver/#dfn-get-window-handles
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue