mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
LibWeb: Make DOMException GC-allocated
This commit is contained in:
parent
0e47754ac8
commit
497ead37bc
58 changed files with 307 additions and 278 deletions
|
@ -234,9 +234,9 @@ void DOMTokenList::set_value(String value)
|
|||
ExceptionOr<void> DOMTokenList::validate_token(StringView token) const
|
||||
{
|
||||
if (token.is_empty())
|
||||
return SyntaxError::create("Non-empty DOM tokens are not allowed");
|
||||
return SyntaxError::create(global_object(), "Non-empty DOM tokens are not allowed");
|
||||
if (any_of(token, is_ascii_space))
|
||||
return InvalidCharacterError::create("DOM tokens containing ASCII whitespace are not allowed");
|
||||
return InvalidCharacterError::create(global_object(), "DOM tokens containing ASCII whitespace are not allowed");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue