mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibWeb: Fix crash in DOMImplementation.createDocument for null namespace
We were blindly assuming that the namespace was non-null instead of simply passing it through.
This commit is contained in:
parent
a028c87069
commit
36c145b197
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Document>> DOMImplementation::create_docume
|
|||
|
||||
// 3. If qualifiedName is not the empty string, then set element to the result of running the internal createElementNS steps, given document, namespace, qualifiedName, and an empty dictionary.
|
||||
if (!qualified_name.is_empty())
|
||||
element = TRY(xml_document->create_element_ns(namespace_.value(), qualified_name, ElementCreationOptions {}));
|
||||
element = TRY(xml_document->create_element_ns(namespace_, qualified_name, ElementCreationOptions {}));
|
||||
|
||||
// 4. If doctype is non-null, append doctype to document.
|
||||
if (doctype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue