mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00: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:
parent
887537b061
commit
2fa84f1683
Notes:
github-actions[bot]
2025-10-27 16:16:17 +00:00
Author: https://github.com/tete17
Commit: 2fa84f1683
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6057
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/Lubrsi ✅
7 changed files with 19 additions and 19 deletions
|
|
@ -296,7 +296,7 @@ static WebIDL::ExceptionOr<GC::Ref<DOM::Document>> load_media_document(HTML::Nav
|
|||
};
|
||||
|
||||
auto style_element = TRY(DOM::create_element(document, HTML::TagNames::style, Namespace::HTML));
|
||||
style_element->set_text_content(R"~~~(
|
||||
MUST(style_element->set_text_content(R"~~~(
|
||||
:root {
|
||||
background-color: #222;
|
||||
}
|
||||
|
|
@ -310,7 +310,7 @@ static WebIDL::ExceptionOr<GC::Ref<DOM::Document>> load_media_document(HTML::Nav
|
|||
img {
|
||||
background-color: #fff;
|
||||
}
|
||||
)~~~"_utf16);
|
||||
)~~~"_utf16));
|
||||
TRY(document->head()->append_child(style_element));
|
||||
|
||||
auto url_string = document->url_string();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue