diff --git a/aio/src/app/custom-elements/code/code-tabs.component.ts b/aio/src/app/custom-elements/code/code-tabs.component.ts index 369216adbb..3ed2cc6d11 100644 --- a/aio/src/app/custom-elements/code/code-tabs.component.ts +++ b/aio/src/app/custom-elements/code/code-tabs.component.ts @@ -57,11 +57,17 @@ export class CodeTabsComponent implements OnInit, AfterViewInit { this.tabs = []; const contentElem = this.content.nativeElement; const codeExamples = Array.from(contentElem.querySelectorAll('code-pane')); - contentElem.innerHTML = ''; // Remove DOM nodes that are no longer needed. for (const tabContent of codeExamples) { this.tabs.push(this.getTabInfo(tabContent)); } + + // Remove DOM nodes that are no longer needed. + // + // NOTE: + // In IE11, doing this also empties the `` nodes captured in `codeExamples` ¯\_(ツ)_/¯ + // Only remove the unnecessary nodes after having captured the `` contents. + contentElem.innerHTML = ''; } ngAfterViewInit() {