wcstack 4.0.0 → 4.0.2

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/README.md CHANGED
@@ -43,7 +43,7 @@ For an app that uses the SPA core anyway, **this package ships the bundle**: `wc
43
43
 
44
44
  ```html
45
45
  <script type="module"
46
- src="https://cdn.jsdelivr.net/npm/wcstack@4.0.0/dist/auto.min.js"
46
+ src="https://cdn.jsdelivr.net/npm/wcstack@4.0.2/dist/auto.min.js"
47
47
  integrity="sha384-…"></script>
48
48
  ```
49
49
 
@@ -321,6 +321,10 @@ GOOD: <p><!--@@: count--></p> <!-- comment binding: no FOUC, no ext
321
321
  BAD: <template data-wcs="for: items|take(2)">
322
322
  GOOD: <template data-wcs="for: firstTwo"> <!-- get firstTwo() { return this.items.slice(0, 2); } -->
323
323
 
324
+ <!-- A class binding names its class after the dot (the same for attr.). -->
325
+ BAD: <li data-wcs="class: done"> <!-- sets a "class" property: no class changes -->
326
+ GOOD: <li data-wcs="class.done: done">
327
+
324
328
  <!-- In a delegated handler, currentTarget is the root. -->
325
329
  BAD: select(event) { event.currentTarget.classList.add("on"); } <!-- with onclick: select -->
326
330
  GOOD: select(event) { event.target.closest("li").classList.add("on"); }