@domql/element 2.5.108 → 2.5.110

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.
@@ -120,13 +120,12 @@ const lookdownAll = function(param, results = []) {
120
120
  const setNodeStyles = function(params = {}) {
121
121
  var _a;
122
122
  const el = this;
123
- const style = (_a = el.node) == null ? void 0 : _a.style;
124
- if (!style)
123
+ if (!((_a = el.node) == null ? void 0 : _a.style))
125
124
  return;
126
125
  for (const param in params) {
127
- style[param] = params[param];
126
+ el.node.style[param] = params[param];
128
127
  }
129
- return style;
128
+ return el;
130
129
  };
131
130
  const remove = function() {
132
131
  const element = this;
@@ -31,7 +31,7 @@ var attr_default = (params, element, node) => {
31
31
  if (params) {
32
32
  for (const attr in params) {
33
33
  const val = (0, import_utils.exec)(params[attr], element);
34
- if (!(0, import_utils.isUndefined)(val) && !(0, import_utils.isNull)(val) && node.setAttribute)
34
+ if (val !== false && !(0, import_utils.isUndefined)(val) && !(0, import_utils.isNull)(val) && node.setAttribute)
35
35
  node.setAttribute(attr, val);
36
36
  else if (node.removeAttribute)
37
37
  node.removeAttribute(attr);
package/methods/index.js CHANGED
@@ -87,14 +87,13 @@ export const lookdownAll = function (param, results = []) {
87
87
 
88
88
  export const setNodeStyles = function (params = {}) {
89
89
  const el = this
90
- const style = el.node?.style
91
- if (!style) return
90
+ if (!el.node?.style) return
92
91
 
93
92
  for (const param in params) {
94
- style[param] = params[param]
93
+ el.node.style[param] = params[param]
95
94
  }
96
95
 
97
- return style
96
+ return el
98
97
  }
99
98
 
100
99
  export const remove = function () {
package/mixins/attr.js CHANGED
@@ -14,7 +14,7 @@ export default (params, element, node) => {
14
14
  for (const attr in params) {
15
15
  const val = exec(params[attr], element)
16
16
  // if (__attr[attr] === val) return
17
- if (!isUndefined(val) && !isNull(val) && node.setAttribute) node.setAttribute(attr, val)
17
+ if (val !== false && !isUndefined(val) && !isNull(val) && node.setAttribute) node.setAttribute(attr, val)
18
18
  else if (node.removeAttribute) node.removeAttribute(attr)
19
19
  __attr[attr] = val
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.5.108",
3
+ "version": "2.5.110",
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": "ff2aaabca6543ef8e045b928e8bd222d62f4a409",
34
+ "gitHead": "2942c0972b473f8be846cbf0e5a9f1917cf20d65",
35
35
  "devDependencies": {
36
36
  "@babel/core": "^7.12.0"
37
37
  }