diff options
-rw-r--r-- | dom/base/nsDocument.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 602da421a..99f922c98 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -5399,6 +5399,10 @@ nsDocument::CreateElement(const nsAString& aTagName, RefPtr<Element> 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(); } |