mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-04 17:33:04 +00:00
LibWeb: Propagate exceptions from setAttribute() in DOMStringMap setter
We were incorrectly assuming that setAttribute() could never fail here, even when passed an invalid name. Found by Domato.
This commit is contained in:
parent
1c00e5688d
commit
093f1dd805
Notes:
github-actions[bot]
2024-07-20 07:32:01 +00:00
Author: https://github.com/awesomekling
Commit: 093f1dd805
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/721
3 changed files with 14 additions and 1 deletions
|
@ -165,7 +165,7 @@ WebIDL::ExceptionOr<void> DOMStringMap::set_value_of_new_named_property(String c
|
|||
// FIXME: 4. If name does not match the XML Name production, throw an "InvalidCharacterError" DOMException.
|
||||
|
||||
// 5. Set an attribute value for the DOMStringMap's associated element using name and value.
|
||||
MUST(m_associated_element->set_attribute(data_name, value));
|
||||
TRY(m_associated_element->set_attribute(data_name, value));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue