| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 33e363250550cde42777781a8a60cb984a27d45b..77cdcf9e400f6b33ba56454926f09664b12a67bc 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -67,6 +67,7 @@
|
| #include "core/dom/PseudoElement.h"
|
| #include "core/dom/ScriptableDocumentParser.h"
|
| #include "core/dom/SelectorQuery.h"
|
| +#include "core/dom/ShadowRootInit.h"
|
| #include "core/dom/StyleChangeReason.h"
|
| #include "core/dom/StyleEngine.h"
|
| #include "core/dom/Text.h"
|
| @@ -1803,9 +1804,15 @@ CustomElementDefinition* Element::customElementDefinition() const
|
| return nullptr;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ScriptState* scriptState, ExceptionState& exceptionState)
|
| +PassRefPtrWillBeRawPtr<ShadowRoot> Element::createShadowRoot(ScriptState* scriptState, ShadowRootInit& shadowRootInitDict, ExceptionState& exceptionState)
|
| {
|
| OriginsUsingFeatures::count(scriptState, document(), OriginsUsingFeatures::Feature::ElementCreateShadowRoot);
|
| + // TODO(kochi): Add support for closed shadow root. crbug.com/459136
|
| + if (shadowRootInitDict.hasMode() && shadowRootInitDict.mode() == "closed") {
|
| + exceptionState.throwDOMException(NotSupportedError, "Closed shadow root is not implemented yet.");
|
| + return nullptr;
|
| + }
|
| +
|
| return createShadowRoot(exceptionState);
|
| }
|
|
|
|
|