enigmatic 0.24.0 → 0.25.0

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.
Files changed (2) hide show
  1. package/e2.js +13 -14
  2. package/package.json +1 -1
package/e2.js CHANGED
@@ -12,18 +12,17 @@ window.custom = {
12
12
  }
13
13
 
14
14
  window.state = new Proxy({}, {
15
- set(obj, prop, value) {
16
- obj[prop] = value
17
- console.log('set', prop, value);
18
- $$(`hello-world, hello-world-2`).forEach(el => {
19
- console.log('setting', el.tagName);
20
- const f = window.custom[el.tagName.toLowerCase()];
21
- if(typeof f === 'function') {
22
- el.innerHTML = f(value);
23
- } else {
24
- el.innerHTML = f.render(value);
25
- }
26
- });
27
- return true
28
- }
15
+ set(obj, prop, value) {
16
+ obj[prop] = value
17
+ $$(`[data="${prop}"]`).forEach(el => {
18
+ console.log('setting', el.tagName);
19
+ const f = window.custom[el.tagName.toLowerCase()];
20
+ if(typeof f === 'function') {
21
+ el.innerHTML = f(value);
22
+ } else {
23
+ el.innerHTML = f.render(value);
24
+ }
25
+ });
26
+ return true
27
+ }
29
28
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "enigmatic",
3
3
  "main": "enigmatic.js",
4
- "version": "0.24.0",
4
+ "version": "0.25.0",
5
5
  "scripts": {
6
6
  "test": "jest",
7
7
  "test:watch": "jest --watch"