mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 14:50:18 +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
Notes:
sideshowbarker
2024-07-17 10:10:18 +09:00
Author: https://github.com/shannonbooth
Commit: 36c145b197
Pull-request: https://github.com/SerenityOS/serenity/pull/22567
Reviewed-by: https://github.com/awesomekling
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