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:
Tete17
2025-08-08 02:25:57 +02:00
committed by Luke Wilde
parent 887537b061
commit 2fa84f1683
Notes: github-actions[bot] 2025-10-27 16:16:17 +00:00
7 changed files with 19 additions and 19 deletions

View File

@@ -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;
}
}