mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibWeb: Make factory methods of DOM::Document fallible
This commit is contained in:
committed by
Linus Groh
parent
552663a2ba
commit
0d9076c9f5
@@ -37,7 +37,7 @@ JS::ThrowCompletionOr<void> DOMParser::initialize(JS::Realm& realm)
|
||||
JS::NonnullGCPtr<DOM::Document> DOMParser::parse_from_string(DeprecatedString const& string, Bindings::DOMParserSupportedType type)
|
||||
{
|
||||
// 1. Let document be a new Document, whose content type is type and url is this's relevant global object's associated Document's URL.
|
||||
auto document = DOM::Document::create(realm(), verify_cast<HTML::Window>(relevant_global_object(*this)).associated_document().url());
|
||||
auto document = DOM::Document::create(realm(), verify_cast<HTML::Window>(relevant_global_object(*this)).associated_document().url()).release_value_but_fixme_should_propagate_errors();
|
||||
document->set_content_type(Bindings::idl_enum_to_deprecated_string(type));
|
||||
|
||||
// 2. Switch on type:
|
||||
|
||||
Reference in New Issue
Block a user