@webqit/oohtml 3.1.4 → 3.1.6

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": "3.1.4",
17
+ "version": "3.1.6",
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
@@ -35,7 +35,7 @@
35
35
  "postpublish": "git push && git push --tags"
36
36
  },
37
37
  "dependencies": {
38
- "@webqit/quantum-js": "^4.2.0",
38
+ "@webqit/quantum-js": "^4.2.3",
39
39
  "@webqit/realdom": "^2.1.19",
40
40
  "@webqit/util": "^0.8.11"
41
41
  },
@@ -48,4 +48,9 @@ export default class DOMBindingsContext extends DOMContext {
48
48
  event.respondWith( descriptor.value );
49
49
  }, { live: event.live, signal: event.signal, descripted: true } );
50
50
  }
51
+
52
+ /**
53
+ * @unsubscribed()
54
+ */
55
+ unsubscribed( event ) { event._controller?.abort(); }
51
56
  }
@@ -150,7 +150,10 @@ function parseInlineBindings( config, str ) {
150
150
  const [ left, right ] = splitOuter( str, ':' ).map( x => x.trim() );
151
151
  const directive = left[ 0 ], param = left.slice( 1 ).trim();
152
152
  const arg = `(${ right })`, $arg = `(${ arg } ?? '')`;
153
- if ( directive === '&' ) return `this.style["${ escDouble( param ) }"] = ${ $arg };`;
153
+ if ( directive === '&' ) {
154
+ if ( param.startsWith( '--' ) ) return `this.style.setProperty("${ escDouble( param ) }", ${ $arg });`;
155
+ return `this.style["${ escDouble( param ) }"] = ${ $arg };`;
156
+ }
154
157
  if ( directive === '%' ) return `this.classList.toggle("${ escDouble( param ) }", !!${ arg });`;
155
158
  if ( directive === '~' ) {
156
159
  if ( param.startsWith( '?' ) ) return `this.toggleAttribute("${ escDouble( param.substring( 1 ).trim() ) }", !!${ arg });`;
@@ -70,6 +70,11 @@ export default class HTMLImportsContext extends DOMContext {
70
70
  }, { lifecycleSignals: true, ...options } );
71
71
  }
72
72
 
73
+ /**
74
+ * @unsubscribed()
75
+ */
76
+ unsubscribed( event ) { event._controller?.abort(); }
77
+
73
78
  /**
74
79
  * @startRealtime()
75
80
  */