@webqit/oohtml 4.1.3 → 4.1.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.1.3",
17
+ "version": "4.1.4",
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
@@ -313,6 +313,7 @@ function realtime( config ) {
313
313
  if ( entry.isConnected ) { setupBinding( entry, attrName, _( entry, 'attrOriginals' ).get( attrName )/* Saved original value */ || attrValue/* Lest it's ID */, newNamespaceObj ); }
314
314
  };
315
315
  record.exits.forEach( entry => {
316
+ if (!entry.isConnected) return;
316
317
  const namespaceObj = getOwnNamespaceObject.call( window, entry );
317
318
  // Detach ID and IDREF associations
318
319
  for ( const node of new Set( [ ...Object.values( namespaceObj ), ...( _( namespaceObj ).get( 'idrefs' ) || [] ) ] ) ) {
@@ -342,7 +343,8 @@ function realtime( config ) {
342
343
  realdom.realtime( window.document ).query( `[${ attrList.map( attrName => window.CSS.escape( attrName ) ).join( '],[' ) }]`, record => {
343
344
  for ( const attrName of attrList ) {
344
345
  record.exits.forEach( entry => {
345
- if ( !entry.hasAttribute( attrName ) ) return;
346
+ const namespaceNodeToTest = ( attrName === config.attr.lid ? entry.parentNode : entry )?.closest/*can be documentFragment when Shadow DOM*/?.( config.namespaceSelector ) || entry.getRootNode().host;
347
+ if ( ( namespaceNodeToTest && !namespaceNodeToTest.isConnected ) || !entry.hasAttribute( attrName ) ) return;
346
348
  cleanupBinding( entry, attrName, () => entry.getAttribute( attrName )/* Current resolved value as-is */ );
347
349
  } );
348
350
  record.entrants.forEach( entry => {