File tree 1 file changed +1
-12
lines changed
1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,6 @@ function isWildcard(accept: string | null) {
45
45
}
46
46
47
47
export default class IncludeFragmentElement extends HTMLElement {
48
- _attached : boolean
49
-
50
- constructor ( ) {
51
- super ( )
52
- this . _attached = false
53
- }
54
48
55
49
static get observedAttributes ( ) : string [ ] {
56
50
return [ 'src' ]
@@ -86,23 +80,18 @@ export default class IncludeFragmentElement extends HTMLElement {
86
80
attributeChangedCallback ( attribute : string ) : void {
87
81
if ( attribute === 'src' ) {
88
82
// Source changed after attached so replace element.
89
- if ( this . _attached ) {
83
+ if ( this . isConnected ) {
90
84
handleData ( this )
91
85
}
92
86
}
93
87
}
94
88
95
89
connectedCallback ( ) : void {
96
- this . _attached = true
97
90
if ( this . src ) {
98
91
handleData ( this )
99
92
}
100
93
}
101
94
102
- disconnectedCallback ( ) : void {
103
- this . _attached = false
104
- }
105
-
106
95
request ( ) : Request {
107
96
const src = this . src
108
97
if ( ! src ) {
You can’t perform that action at this time.
0 commit comments