1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibWeb: Add namespace to Element

This commit is contained in:
Luke 2020-10-10 02:48:05 +01:00 committed by Andreas Kling
parent efaf03e986
commit e8a9e8aed5
167 changed files with 505 additions and 340 deletions

View file

@ -54,6 +54,7 @@
#include <LibWeb/InProcessWebView.h>
#include <LibWeb/Layout/LayoutDocument.h>
#include <LibWeb/Layout/LayoutTreeBuilder.h>
#include <LibWeb/Namespace.h>
#include <LibWeb/Origin.h>
#include <LibWeb/Page/Frame.h>
#include <LibWeb/SVG/TagNames.h>
@ -460,7 +461,8 @@ JS::Value Document::run_javascript(const StringView& source)
NonnullRefPtr<Element> Document::create_element(const String& tag_name)
{
return DOM::create_element(*this, tag_name);
// FIXME: Let namespace be the HTML namespace, if this is an HTML document or thiss content type is "application/xhtml+xml", and null otherwise.
return DOM::create_element(*this, tag_name, Namespace::HTML);
}
NonnullRefPtr<DocumentFragment> Document::create_document_fragment()