| Index: Source/core/dom/custom/CustomElement.cpp
|
| diff --git a/Source/core/dom/custom/CustomElement.cpp b/Source/core/dom/custom/CustomElement.cpp
|
| index 0dc1683ca39eb1d0e8fcddc8178b5413e162af22..27cdde94795e0876efbc0430334d8888317a4eb8 100644
|
| --- a/Source/core/dom/custom/CustomElement.cpp
|
| +++ b/Source/core/dom/custom/CustomElement.cpp
|
| @@ -101,7 +101,9 @@ void CustomElement::define(Element* element, PassRefPtr<CustomElementDefinition>
|
|
|
| case Element::WaitingForUpgrade:
|
| definitions().add(element, definition);
|
| - CustomElementCallbackScheduler::scheduleCreatedCallback(definition->callbacks(), element);
|
| + if (element->inDocument() && element->document().domWindow())
|
| + CustomElementCallbackScheduler::scheduleAttachedCallback(definition->callbacks(), element);
|
| + definition->callbacks()->created(element);
|
| break;
|
| }
|
| }
|
|
|