@domql/element 2.5.110 → 2.5.111
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/dist/cjs/methods/index.js +6 -1
- package/methods/index.js +5 -2
- package/package.json +2 -2
|
@@ -123,7 +123,12 @@ const setNodeStyles = function(params = {}) {
|
|
|
123
123
|
if (!((_a = el.node) == null ? void 0 : _a.style))
|
|
124
124
|
return;
|
|
125
125
|
for (const param in params) {
|
|
126
|
-
|
|
126
|
+
const value = params[param];
|
|
127
|
+
const childElem = el[param];
|
|
128
|
+
if ((0, import_utils.isObject)(value) && childElem)
|
|
129
|
+
setNodeStyles.call(childElem, value);
|
|
130
|
+
else
|
|
131
|
+
el.node.style[param] = value;
|
|
127
132
|
}
|
|
128
133
|
return el;
|
|
129
134
|
};
|
package/methods/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { isDefined, isFunction, isObjectLike, isProduction } from '@domql/utils'
|
|
3
|
+
import { isDefined, isObject, isFunction, isObjectLike, isProduction } from '@domql/utils'
|
|
4
4
|
import { TREE } from '../tree'
|
|
5
5
|
import { parseFilters, registry } from '../mixins'
|
|
6
6
|
|
|
@@ -90,7 +90,10 @@ export const setNodeStyles = function (params = {}) {
|
|
|
90
90
|
if (!el.node?.style) return
|
|
91
91
|
|
|
92
92
|
for (const param in params) {
|
|
93
|
-
|
|
93
|
+
const value = params[param]
|
|
94
|
+
const childElem = el[param]
|
|
95
|
+
if (isObject(value) && childElem) setNodeStyles.call(childElem, value)
|
|
96
|
+
else el.node.style[param] = value
|
|
94
97
|
}
|
|
95
98
|
|
|
96
99
|
return el
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.111",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@domql/state": "latest",
|
|
32
32
|
"@domql/utils": "latest"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "ec0f20662c99a27fa314328fc20e4c2ac2650cde",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|