Index: third_party/WebKit/Source/core/dom/custom/CustomElement.cpp |
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp |
index 12f220e68a603f372f802a8650c12b72121f9725..774930137779cae47f1be1d92b639009727b0dbb 100644 |
--- a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp |
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp |
@@ -6,6 +6,8 @@ |
#include "core/dom/Document.h" |
#include "core/dom/QualifiedName.h" |
+#include "core/dom/custom/CEReactionsScope.h" |
+#include "core/dom/custom/CustomElementUpgradeReaction.h" |
#include "core/dom/custom/V0CustomElement.h" |
#include "core/dom/custom/V0CustomElementRegistrationContext.h" |
#include "core/frame/LocalDOMWindow.h" |
@@ -98,4 +100,13 @@ HTMLElement* CustomElement::createCustomElement(Document& document, const Qualif |
return element; |
} |
+void CustomElement::enqueueUpgradeReaction(Element* element, CustomElementDefinition* definition) |
+{ |
+ // CEReactionsScope must be created by [CEReactions] in IDL, |
+ // or callers must setup explicitly if it does not go through bindings. |
+ DCHECK(CEReactionsScope::current()); |
+ CEReactionsScope::current()->enqueue(element, |
+ new CustomElementUpgradeReaction(definition)); |
+} |
+ |
} // namespace blink |