mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
LibWeb: Move DOMException from DOM/ to WebIDL/
This commit is contained in:
parent
ad04d7ac9b
commit
bbaa05fcf9
49 changed files with 206 additions and 203 deletions
|
@ -38,7 +38,7 @@ WebIDL::ExceptionOr<String> CharacterData::substring_data(size_t offset, size_t
|
|||
|
||||
// 2. If offset is greater than length, then throw an "IndexSizeError" DOMException.
|
||||
if (offset > length)
|
||||
return DOM::IndexSizeError::create(global_object(), "Substring offset out of range.");
|
||||
return WebIDL::IndexSizeError::create(global_object(), "Substring offset out of range.");
|
||||
|
||||
// 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.
|
||||
|
@ -57,7 +57,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 DOM::IndexSizeError::create(global_object(), "Replacement offset out of range.");
|
||||
return WebIDL::IndexSizeError::create(global_object(), "Replacement offset out of range.");
|
||||
|
||||
// 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