summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dom/html/nsHTMLContentSink.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/dom/html/nsHTMLContentSink.cpp b/dom/html/nsHTMLContentSink.cpp
index 6e808f87e..bba5d38ab 100644
--- a/dom/html/nsHTMLContentSink.cpp
+++ b/dom/html/nsHTMLContentSink.cpp
@@ -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);
}