mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 11:57:35 +00:00
LibWeb: Convert Web::DOM::Position::to_deprecated_string to String
This commit is contained in:
parent
cd5868a0f1
commit
2c4acba883
2 changed files with 8 additions and 9 deletions
|
@ -18,11 +18,11 @@ Position::Position(Node& node, unsigned offset)
|
|||
{
|
||||
}
|
||||
|
||||
DeprecatedString Position::to_deprecated_string() const
|
||||
ErrorOr<String> Position::to_string() const
|
||||
{
|
||||
if (!node())
|
||||
return DeprecatedString::formatted("DOM::Position(nullptr, {})", offset());
|
||||
return DeprecatedString::formatted("DOM::Position({} ({})), {})", node()->node_name(), node(), offset());
|
||||
return String::formatted("DOM::Position(nullptr, {})", offset());
|
||||
return String::formatted("DOM::Position({} ({})), {})", node()->node_name(), node(), offset());
|
||||
}
|
||||
|
||||
bool Position::increment_offset()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue