@thi.ng/hdom-mock 2.1.162 → 2.1.164
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 +1 -1
- package/index.js +3 -3
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 211 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/index.js
CHANGED
|
@@ -28,7 +28,7 @@ class HDOMNode {
|
|
|
28
28
|
}
|
|
29
29
|
get textContent() {
|
|
30
30
|
const res = [];
|
|
31
|
-
for (
|
|
31
|
+
for (const c of this._children) {
|
|
32
32
|
if (c.isText()) {
|
|
33
33
|
res.push(c.body);
|
|
34
34
|
}
|
|
@@ -137,7 +137,7 @@ class MockHDOM {
|
|
|
137
137
|
parent.removeChild(i);
|
|
138
138
|
}
|
|
139
139
|
setAttribs(el, attribs) {
|
|
140
|
-
for (
|
|
140
|
+
for (const k in attribs) {
|
|
141
141
|
this.setAttrib(el, k, attribs[k], attribs);
|
|
142
142
|
}
|
|
143
143
|
return el;
|
|
@@ -191,7 +191,7 @@ class MockHDOM {
|
|
|
191
191
|
el.textContent = value;
|
|
192
192
|
}
|
|
193
193
|
setStyle(el, rules) {
|
|
194
|
-
for (
|
|
194
|
+
for (const r in rules) {
|
|
195
195
|
let v = rules[r];
|
|
196
196
|
isFunction(v) && (v = v(rules));
|
|
197
197
|
v != null && ((el.style || (el.style = {}))[r] = v);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/hdom-mock",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.164",
|
|
4
4
|
"description": "Mock base implementation for @thi.ng/hdom API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.12.
|
|
43
|
-
"@thi.ng/checks": "^3.
|
|
44
|
-
"@thi.ng/hdom": "^9.4.
|
|
42
|
+
"@thi.ng/api": "^8.12.10",
|
|
43
|
+
"@thi.ng/checks": "^3.8.0",
|
|
44
|
+
"@thi.ng/hdom": "^9.4.97"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"esbuild": "^0.27.0",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"status": "alpha",
|
|
73
73
|
"year": 2018
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
|
|
76
76
|
}
|