1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibWeb/WebIDL: Store SimpleException message as a String{,View} variant

This commit is contained in:
Linus Groh 2023-03-03 18:04:58 +00:00
parent 1032ac2453
commit 11b40dbcf5
8 changed files with 28 additions and 24 deletions

View file

@ -216,10 +216,7 @@ WebIDL::ExceptionOr<bool> DOMTokenList::supports([[maybe_unused]] StringView tok
// FIXME: Implement this fully when any use case defines supported tokens.
// 1. If the associated attributes local name does not define supported tokens, throw a TypeError.
return WebIDL::SimpleException {
WebIDL::SimpleExceptionType::TypeError,
DeprecatedString::formatted("Attribute {} does not define any supported tokens", m_associated_attribute)
};
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, String::formatted("Attribute {} does not define any supported tokens", m_associated_attribute).release_value_but_fixme_should_propagate_errors() };
// 2. Let lowercase token be a copy of token, in ASCII lowercase.
// 3. If lowercase token is present in supported tokens, return true.