mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-16 18:00:33 +03:00
fix: Use parentNode instead of parentElement to fix IE11 crash
fixes #406
This commit is contained in:
parent
687b75331a
commit
e8adb605c3
|
@ -76,7 +76,7 @@ export class Redoc extends BaseComponent implements OnInit {
|
|||
optionsMgr.options = getPreOptions();
|
||||
|
||||
this.element = elementRef.nativeElement;
|
||||
this.$parent = this.element.parentElement;
|
||||
this.$parent = this.element.parentNode as Element;
|
||||
this.$refElem = this.element.nextElementSibling;
|
||||
|
||||
//parse options (top level component doesn't support inputs)
|
||||
|
|
|
@ -6,9 +6,9 @@ import * as Remarkable from 'remarkable';
|
|||
import { StringMap } from './';
|
||||
|
||||
function HTMLescape(html: string): string {
|
||||
return document.createElement('div')
|
||||
return (document.createElement('div')
|
||||
.appendChild(document.createTextNode(html))
|
||||
.parentElement
|
||||
.parentNode as Element)
|
||||
.innerHTML;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user