Bug 1357002 - Part 2: Don't call SetupCustomElement() if the custom element feature is pref-ed off;

Tag UXP Issue #1344
This commit is contained in:
Gaming4JC 2020-01-04 13:20:19 -05:00 committed by Roy Tam
commit 5ad5f4e1ec

View file

@ -265,7 +265,8 @@ NS_NewHTMLElement(Element** aResult, already_AddRefed<mozilla::dom::NodeInfo>&&
return NS_ERROR_OUT_OF_MEMORY;
}
if (isCustomElementName || aIs) {
if (CustomElementRegistry::IsCustomElementEnabled() &&
(isCustomElementName || aIs)) {
nsContentUtils::SetupCustomElement(*aResult, aIs);
}