File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -10,17 +10,17 @@ function fire(name, target) {
10
10
} , 0 )
11
11
}
12
12
13
- function handleData ( data , target ) {
13
+ function handleData ( el , data ) {
14
14
return data . then (
15
15
function ( html ) {
16
- const parentNode = target . parentNode
16
+ const parentNode = el . parentNode
17
17
if ( parentNode ) {
18
- target . insertAdjacentHTML ( 'afterend' , html )
19
- parentNode . removeChild ( target )
18
+ el . insertAdjacentHTML ( 'afterend' , html )
19
+ parentNode . removeChild ( el )
20
20
}
21
21
} ,
22
22
function ( ) {
23
- target . classList . add ( 'is-error' )
23
+ el . classList . add ( 'is-error' )
24
24
}
25
25
)
26
26
}
@@ -84,15 +84,15 @@ export class IncludeFragmentElement extends HTMLElement {
84
84
85
85
// Source changed after attached so replace element.
86
86
if ( this . _attached ) {
87
- handleData ( data , this )
87
+ handleData ( this , data )
88
88
}
89
89
}
90
90
}
91
91
92
92
connectedCallback ( ) {
93
93
this . _attached = true
94
94
if ( this . src ) {
95
- handleData ( this . getData ( ) , this )
95
+ handleData ( this , this . getData ( ) )
96
96
}
97
97
}
98
98
You can’t perform that action at this time.
0 commit comments