MCPcopy Create free account
hub / github.com/ampproject/amphtml / get

Method get

src/polyfills/custom-elements.js:133–138  ·  view source on GitHub ↗

* Get the constructor of the (already defined) custom element. * * @param {string} name * @return {!CustomElementConstructorDef|undefined}

(name)

Source from the content-addressed store, hash-verified

131 * @return {!CustomElementConstructorDef|undefined}
132 */
133 get(name) {
134 const def = this.registry_.getByName(name);
135 if (def) {
136 return def.ctor;
137 }
138 }
139
140 /**
141 * Returns a promise that waits until the custom element is defined.

Callers

nothing calls this directly

Calls 1

getByNameMethod · 0.80

Tested by

no test coverage detected