From 5840b63cca00a45c8c40bf5e04195aabd4dabb73 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 5 Jan 2020 12:28:48 -0500 Subject: Bug 1301024 - Part 1: Set CreateElement/CreateElementNS is attribute. Tag UXP Issue #1344 --- dom/base/nsDocument.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 602da421a4..99f922c98b 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -5399,6 +5399,10 @@ nsDocument::CreateElement(const nsAString& aTagName, RefPtr elem = CreateElem( needsLowercase ? lcTagName : aTagName, nullptr, mDefaultElementType, is); + if (is) { + elem->SetAttr(kNameSpaceID_None, nsGkAtoms::is, *is, true); + } + return elem.forget(); } @@ -5443,6 +5447,10 @@ nsDocument::CreateElementNS(const nsAString& aNamespaceURI, return nullptr; } + if (is) { + element->SetAttr(kNameSpaceID_None, nsGkAtoms::is, *is, true); + } + return element.forget(); } -- cgit v1.2.3