Bug 1301024 - Part 1: Set CreateElement/CreateElementNS is attribute.

Tag UXP Issue #1344
This commit is contained in:
Gaming4JC 2020-01-05 12:28:48 -05:00 committed by Roy Tam
commit 054c852fd2

View file

@ -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();
}