Index: third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp |
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp |
index 618fa6158733ce98c0e8a201fb189d03966b939a..e8fbde3d03ab1a71606c0bafeef9c9d952625c0f 100644 |
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp |
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp |
@@ -112,6 +112,18 @@ void CustomElementsRegistry::define( |
// 20: when-defined promise processing |
} |
+// https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementsregistry-get |
+ScriptValue CustomElementsRegistry::get(const AtomicString& name) |
+{ |
+ CustomElementDefinition* definition = definitionForName(name); |
+ if (!definition) { |
+ // Binding layer converts |ScriptValue()| to script specific value, |
+ // e.g. |undefined| for v8. |
+ return ScriptValue(); |
+ } |
+ return definition->getConstructorForScript(); |
+} |
+ |
bool CustomElementsRegistry::v0NameIsDefined(const AtomicString& name) const |
{ |
if (!m_v0) |