MCPcopy Index your code
hub / github.com/ampproject/amphtml / hasCustomElements

Function hasCustomElements

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

* Does win have a full Custom Elements registry? * * @param {!Window} win * @return {boolean}

(win)

Source from the content-addressed store, hash-verified

64 * @return {boolean}
65 */
66function hasCustomElements(win) {
67 const {customElements} = win;
68
69 return !!(
70 customElements &&
71 customElements.define &&
72 customElements.get &&
73 customElements.whenDefined
74 );
75}
76
77/**
78 * Was HTMLElement already patched for this window?

Callers 1

installFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected