@webqit/oohtml 4.5.1 → 4.5.3

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.5.1",
17
+ "version": "4.5.3",
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
@@ -39,8 +39,8 @@
39
39
  "postpublish": "git push && git push --tags"
40
40
  },
41
41
  "dependencies": {
42
- "@webqit/quantum-js": "^4.5.31",
43
- "@webqit/realdom": "^2.1.34",
42
+ "@webqit/quantum-js": "^4.6.0",
43
+ "@webqit/realdom": "^2.1.35",
44
44
  "@webqit/util": "^0.8.16"
45
45
  },
46
46
  "devDependencies": {
@@ -228,10 +228,10 @@ function compileInlineBindings( config, str ) {
228
228
  ${ indices ? `let ${ indices } = -1;` : '' }
229
229
  for ( let ${ production[ 0 ] } ${ kind } $iteratee__ ) {
230
230
  ${ indices ? `${ indices } ++;` : '' }
231
- ${ kind === 'in' && production[ 1 ] ? `let ${ production[ 1 ] } = $iteratee__[ ${ production[ 0 ] } ];` : '' }
232
- const $itemBinding__ = { ${ production.join( ', ' ) } };
231
+ ${ kind === 'in' && production[ 1 ] ? `let /*value*/${ production[ 1 ] } = $iteratee__[ ${ production[ 0 ] } ];` : '' }
232
+ let $itemBinding__ = { ${ production.join( ', ' ) } };
233
233
 
234
- const $key___ = ( ${ kind === 'in' ? production[ 0 ] : indices } ) + '';
234
+ let $key___ = ( ${ kind === 'in' ? production[ 0 ] : indices } ) + '';
235
235
  let $itemNode__ = $existing__.get( $key___ );
236
236
  if ( $itemNode__ ) {
237
237
  $existing__.delete( $key___ );
@@ -369,8 +369,12 @@ function realtime( config ) {
369
369
  // Attr realtime
370
370
  realdom.realtime( window.document, 'attr' ).observe( attrList, records => {
371
371
  for ( const record of records ) {
372
- if ( record.oldValue ) { cleanupBinding( record.target, record.name, record.oldValue/* Current resolved value as-is */ ); }
373
- if ( record.value ) { setupBinding( record.target, record.name, record.value/* Raw value (as-is) that will be saved as original */ ); }
372
+ if ( record.oldValue && record.value !== record.oldValue ) {
373
+ cleanupBinding( record.target, record.name, record.oldValue/* Current resolved value as-is */ );
374
+ }
375
+ if ( record.value && record.value !== record.oldValue ) {
376
+ setupBinding( record.target, record.name, record.value/* Raw value (as-is) that will be saved as original */ );
377
+ }
374
378
  }
375
379
  }, { id: 'namespace-html:attr(attrs)', subtree: 'cross-roots', timing: 'sync', newValue: true, oldValue: true } );
376
380