File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 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) {
4545}
4646
4747export default class IncludeFragmentElement extends HTMLElement {
48- _attached : boolean
49-
50- constructor ( ) {
51- super ( )
52- this . _attached = false
53- }
5448
5549 static get observedAttributes ( ) : string [ ] {
5650 return [ 'src' ]
@@ -86,23 +80,18 @@ export default class IncludeFragmentElement extends HTMLElement {
8680 attributeChangedCallback ( attribute : string ) : void {
8781 if ( attribute === 'src' ) {
8882 // Source changed after attached so replace element.
89- if ( this . _attached ) {
83+ if ( this . isConnected ) {
9084 handleData ( this )
9185 }
9286 }
9387 }
9488
9589 connectedCallback ( ) : void {
96- this . _attached = true
9790 if ( this . src ) {
9891 handleData ( this )
9992 }
10093 }
10194
102- disconnectedCallback ( ) : void {
103- this . _attached = false
104- }
105-
10695 request ( ) : Request {
10796 const src = this . src
10897 if ( ! src ) {
You can’t perform that action at this time.
0 commit comments