mirror of
https://github.com/Redocly/redoc.git
synced 2025-06-29 08:43:03 +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();
|
optionsMgr.options = getPreOptions();
|
||||||
|
|
||||||
this.element = elementRef.nativeElement;
|
this.element = elementRef.nativeElement;
|
||||||
this.$parent = this.element.parentElement;
|
this.$parent = this.element.parentNode as Element;
|
||||||
this.$refElem = this.element.nextElementSibling;
|
this.$refElem = this.element.nextElementSibling;
|
||||||
|
|
||||||
//parse options (top level component doesn't support inputs)
|
//parse options (top level component doesn't support inputs)
|
||||||
|
|
|
@ -6,9 +6,9 @@ import * as Remarkable from 'remarkable';
|
||||||
import { StringMap } from './';
|
import { StringMap } from './';
|
||||||
|
|
||||||
function HTMLescape(html: string): string {
|
function HTMLescape(html: string): string {
|
||||||
return document.createElement('div')
|
return (document.createElement('div')
|
||||||
.appendChild(document.createTextNode(html))
|
.appendChild(document.createTextNode(html))
|
||||||
.parentElement
|
.parentNode as Element)
|
||||||
.innerHTML;
|
.innerHTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user