MCPcopy Create free account
hub / github.com/darkreader/darkreader / resolveCustomElement

Function resolveCustomElement

src/inject/dynamic-theme/stylesheet-proxy.ts:182–186  ·  view source on GitHub ↗
(tag: string)

Source from the content-addressed store, hash-verified

180 }
181
182 function resolveCustomElement(tag: string) {
183 customElements.whenDefined(tag).then(() => {
184 document.dispatchEvent(new CustomEvent('__darkreader__isDefined', {detail: {tag}}));
185 });
186 }
187
188 documentEventListener('__darkreader__addUndefinedResolver', (e: CustomEvent<{tag: string}>) => resolveCustomElement(e.detail.tag));
189

Callers 1

injectProxyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…