@webqit/oohtml 4.3.3 → 4.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "wicg-proposal"
15
15
  ],
16
16
  "homepage": "https://webqit.io/tooling/oohtml",
17
- "version": "4.3.3",
17
+ "version": "4.3.4",
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
@@ -63,7 +63,6 @@ export default function() {
63
63
  } );
64
64
  }, { live: true, timing: 'sync', lifecycleSignals: true } );
65
65
  priv.autoDestroyRealtime = realdom.realtime( window.document ).track( parentNode, () => {
66
- this.state = null;
67
66
  priv.die();
68
67
  }, { subtree: 'cross-roots', timing: 'sync', generation: 'exits' } );
69
68
  };
@@ -98,8 +97,9 @@ export default function() {
98
97
  const restore = () => {
99
98
  if (this.el.isConnected) return;
100
99
  this.el.setAttribute( 'data-nodecount', 0 );
101
- this.state = 'restored';
100
+ priv.internalMutation = true;
102
101
  priv.anchorNode.replaceWith( this.el );
102
+ priv.internalMutation = false;
103
103
  priv.setAnchorNode( null );
104
104
  };
105
105
  if ( !priv.slottedElements.size ) return restore();
@@ -119,12 +119,12 @@ export default function() {
119
119
  };
120
120
 
121
121
  priv.connectedCallback = () => {
122
- if ( this.state === 'restored' ) return;
122
+ if ( priv.internalMutation ) return;
123
123
  priv.live( fragments => this.fill( fragments ) );
124
124
  };
125
125
 
126
126
  priv.disconnectedCallback = () => {
127
- if ( this.state === 'resolved' ) return;
127
+ if ( priv.internalMutation ) return;
128
128
  priv.die();
129
129
  };
130
130
  }
@@ -175,8 +175,9 @@ export default function() {
175
175
  // not the import element itslef - but all only when we have slottableElements.size
176
176
  if ( slottableElements.size && this.el.isConnected ) {
177
177
  const newAnchorNode = this[ '#' ].setAnchorNode( this.createAnchorNode() );
178
- this.state = 'resolved';
178
+ this[ '#' ].internalMutation = true;
179
179
  this.el.replaceWith( newAnchorNode );
180
+ this[ '#' ].internalMutation = false;
180
181
  }
181
182
  // Insert slottables now
182
183
  slottableElements.forEach( slottableElement => {