mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibWeb: Properly propagate errors for Node set_text_content
This function was supposed to throw errors even before the TrustedTypes spec thanks to the CharacterData replaceData call but had a MUST. This changes this to ensure this function can throw an error
This commit is contained in:
Notes:
github-actions[bot]
2025-10-27 16:16:17 +00:00
Author: https://github.com/tete17 Commit: https://github.com/LadybirdBrowser/ladybird/commit/2fa84f1683d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6057 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/Lubrsi ✅
@@ -633,7 +633,7 @@ void HTMLSelectElement::update_inner_text_element()
|
||||
// Update inner text element to the label of the selected option
|
||||
for (auto const& option_element : m_cached_list_of_options) {
|
||||
if (option_element->selected()) {
|
||||
m_inner_text_element->set_text_content(Infra::strip_and_collapse_whitespace(Utf16String::from_utf8(option_element->label())));
|
||||
MUST(m_inner_text_element->set_text_content(Infra::strip_and_collapse_whitespace(Utf16String::from_utf8(option_element->label()))));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user