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

Method teardown

testing/describes.js:889–908  ·  view source on GitHub ↗

@override

(env)

Source from the content-addressed store, hash-verified

887
888 /** @override */
889 teardown(env) {
890 const {win} = env;
891 resetTrackImpressionPromiseForTesting();
892 if (env.embed) {
893 env.embed.destroy();
894 }
895 if (win.customElements && win.customElements.elements) {
896 for (const k in win.customElements.elements) {
897 resetScheduledElementForTesting(win, k);
898 }
899 }
900 if (this.spec.amp.extensions) {
901 this.spec.amp.extensions.forEach((extensionId) => {
902 if (extensionId.indexOf(':') != -1) {
903 extensionId = extensionId.substring(0, extensionId.indexOf(':'));
904 }
905 resetScheduledElementForTesting(win, extensionId);
906 });
907 }
908 }
909}
910
911/**

Callers 2

vue-todomvc.jsFile · 0.45
templateFuncFunction · 0.45

Calls 4

destroyMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected