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..777197572386e4ab9f659e29f58428104ee11b8c 100644 |
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp |
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp |
@@ -112,6 +112,17 @@ void CustomElementsRegistry::define( |
// 20: when-defined promise processing |
} |
+// https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementsregistry-get |
+ScriptValue CustomElementsRegistry::get( |
+ ScriptState* scriptState, |
+ const AtomicString& name) |
+{ |
+ CustomElementDefinition* definition = definitionForName(name); |
+ if (!definition) |
+ return ScriptValue(scriptState, v8Undefined()); |
+ return definition->getConstructor(scriptState); |
+} |
+ |
bool CustomElementsRegistry::v0NameIsDefined(const AtomicString& name) const |
{ |
if (!m_v0) |