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..4e78ee70b7b818ed31574651eac53a9c6f8afbe2 100644 |
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp |
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp |
@@ -112,6 +112,20 @@ 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) { |
+ // Binding layer converts |ScriptValue()| to script specific value, |
dominicc (has gone to gerrit)
2016/05/31 22:56:32
Love this comment. Short and specific.
|
+ // e.g. |undefined| for v8. |
+ return ScriptValue(); |
+ } |
+ return definition->getConstructor(scriptState); |
+} |
+ |
bool CustomElementsRegistry::v0NameIsDefined(const AtomicString& name) const |
{ |
if (!m_v0) |