@@ -8,7 +8,6 @@ import type {
8
8
SimpleNode ,
9
9
SimpleText ,
10
10
} from '@glimmer/interfaces' ;
11
- import type { TrustedHTML } from 'trusted-types/lib' ;
12
11
import { expect , INSERT_BEFORE_BEGIN , INSERT_BEFORE_END , NS_SVG } from '@glimmer/util' ;
13
12
14
13
import { ConcreteBounds } from '../bounds' ;
@@ -67,11 +66,7 @@ export class DOMOperations {
67
66
parent . insertBefore ( node , reference ) ;
68
67
}
69
68
70
- insertHTMLBefore (
71
- parent : SimpleElement ,
72
- nextSibling : Nullable < SimpleNode > ,
73
- html : string | TrustedHTML
74
- ) : Bounds {
69
+ insertHTMLBefore ( parent : SimpleElement , nextSibling : Nullable < SimpleNode > , html : string ) : Bounds {
75
70
if ( html === '' ) {
76
71
const comment = this . createComment ( '' ) ;
77
72
parent . insertBefore ( comment , nextSibling ) ;
@@ -82,10 +77,10 @@ export class DOMOperations {
82
77
let last : SimpleNode ;
83
78
84
79
if ( nextSibling === null ) {
85
- parent . insertAdjacentHTML ( INSERT_BEFORE_END , html as string ) ;
80
+ parent . insertAdjacentHTML ( INSERT_BEFORE_END , html ) ;
86
81
last = expect ( parent . lastChild , 'bug in insertAdjacentHTML?' ) ;
87
82
} else if ( nextSibling instanceof HTMLElement ) {
88
- nextSibling . insertAdjacentHTML ( 'beforebegin' , html as string ) ;
83
+ nextSibling . insertAdjacentHTML ( 'beforebegin' , html ) ;
89
84
last = expect ( nextSibling . previousSibling , 'bug in insertAdjacentHTML?' ) ;
90
85
} else {
91
86
// Non-element nodes do not support insertAdjacentHTML, so add an
@@ -96,7 +91,7 @@ export class DOMOperations {
96
91
const { uselessElement } = this ;
97
92
98
93
parent . insertBefore ( uselessElement , nextSibling ) ;
99
- uselessElement . insertAdjacentHTML ( INSERT_BEFORE_BEGIN , html as string ) ;
94
+ uselessElement . insertAdjacentHTML ( INSERT_BEFORE_BEGIN , html ) ;
100
95
last = expect ( uselessElement . previousSibling , 'bug in insertAdjacentHTML?' ) ;
101
96
parent . removeChild ( uselessElement ) ;
102
97
}
0 commit comments