MCPcopy
hub / github.com/angular/components / callback

Function callback

src/youtube-player/youtube-player.ts:772–783  ·  view source on GitHub ↗
(event: Event)

Source from the content-addressed store, hash-verified

770 const url = trustedResourceUrl`https://www.youtube.com/iframe_api`;
771 const script = document.createElement('script');
772 const callback = (event: Event) => {
773 script.removeEventListener('load', callback);
774 script.removeEventListener('error', callback);
775
776 if (event.type === 'error') {
777 apiLoaded = false;
778
779 if (typeof ngDevMode === 'undefined' || ngDevMode) {
780 console.error(`Failed to load YouTube API from ${url}`);
781 }
782 }
783 };
784 script.addEventListener('load', callback);
785 script.addEventListener('error', callback);
786 setScriptSrc(script, url);

Callers 10

tab-header.spec.tsFile · 0.85
transferDataFunction · 0.85
invokeCallbacksFunction · 0.85
_forEachExpansionKeyMethod · 0.85
reverseForEachFunction · 0.85

Calls 1

errorMethod · 0.80

Tested by 1

invokeCallbacksFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…