1
Fork 0
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:
Linus Groh 2022-09-25 17:28:46 +01:00
parent ad04d7ac9b
commit bbaa05fcf9
49 changed files with 206 additions and 203 deletions

View file

@ -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 nodes 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)