mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibWeb: Port DOMException interface from DeprecatedString to String
This commit is contained in:
parent
bcb6851c07
commit
41928c2902
65 changed files with 296 additions and 296 deletions
|
@ -44,7 +44,7 @@ WebIDL::ExceptionOr<DeprecatedString> CharacterData::substring_data(size_t offse
|
|||
|
||||
// 2. If offset is greater than length, then throw an "IndexSizeError" DOMException.
|
||||
if (offset > length)
|
||||
return WebIDL::IndexSizeError::create(realm(), "Substring offset out of range.");
|
||||
return WebIDL::IndexSizeError::create(realm(), "Substring offset out of range."_fly_string);
|
||||
|
||||
// 3. If offset plus count is greater than length, return a string whose value is the code units from the offsetth code unit
|
||||
// to the end of node’s data, and then return.
|
||||
|
@ -63,7 +63,7 @@ WebIDL::ExceptionOr<void> CharacterData::replace_data(size_t offset, size_t coun
|
|||
|
||||
// 2. If offset is greater than length, then throw an "IndexSizeError" DOMException.
|
||||
if (offset > length)
|
||||
return WebIDL::IndexSizeError::create(realm(), "Replacement offset out of range.");
|
||||
return WebIDL::IndexSizeError::create(realm(), "Replacement offset out of range."_fly_string);
|
||||
|
||||
// 3. If offset plus count is greater than length, then set count to length minus offset.
|
||||
if (offset + count > length)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue