@domql/element
Advanced tools
Comparing version 2.5.104 to 2.5.105
@@ -35,2 +35,3 @@ "use strict"; | ||
remove: () => remove, | ||
setNodeStyles: () => setNodeStyles, | ||
setProps: () => setProps, | ||
@@ -118,2 +119,13 @@ spotByPath: () => spotByPath | ||
}; | ||
const setNodeStyles = function(params = {}) { | ||
var _a; | ||
const el = this; | ||
const style = (_a = el.node) == null ? void 0 : _a.style; | ||
if (!style) | ||
return; | ||
for (const param in params) { | ||
style[param] = params[param]; | ||
} | ||
return style; | ||
}; | ||
const remove = function() { | ||
@@ -231,2 +243,3 @@ const element = this; | ||
"lookdownAll", | ||
"setNodeStyles", | ||
"spotByPath", | ||
@@ -233,0 +246,0 @@ "keys", |
@@ -50,2 +50,3 @@ "use strict"; | ||
lookdownAll: import__.lookdownAll.bind(element), | ||
setNodeStyles: import__.setNodeStyles.bind(element), | ||
spotByPath: import__.spotByPath.bind(element), | ||
@@ -52,0 +53,0 @@ parse: import__.parse.bind(element), |
@@ -66,2 +66,3 @@ "use strict"; | ||
lookdownAll: {}, | ||
setNodeStyles: {}, | ||
spotByPath: {}, | ||
@@ -68,0 +69,0 @@ keys: {}, |
@@ -88,2 +88,14 @@ 'use strict' | ||
export const setNodeStyles = function (params = {}) { | ||
const el = this | ||
const style = el.node?.style | ||
if (!style) return | ||
for (const param in params) { | ||
style[param] = params[param] | ||
} | ||
return style | ||
} | ||
export const remove = function () { | ||
@@ -208,2 +220,3 @@ const element = this | ||
'lookdownAll', | ||
'setNodeStyles', | ||
'spotByPath', | ||
@@ -210,0 +223,0 @@ 'keys', |
@@ -12,2 +12,3 @@ 'use strict' | ||
lookdownAll, | ||
setNodeStyles, | ||
setProps, | ||
@@ -37,2 +38,3 @@ remove, | ||
lookdownAll: lookdownAll.bind(element), | ||
setNodeStyles: setNodeStyles.bind(element), | ||
spotByPath: spotByPath.bind(element), | ||
@@ -39,0 +41,0 @@ parse: parse.bind(element), |
@@ -50,2 +50,3 @@ 'use strict' | ||
lookdownAll: {}, | ||
setNodeStyles: {}, | ||
spotByPath: {}, | ||
@@ -52,0 +53,0 @@ keys: {}, |
{ | ||
"name": "@domql/element", | ||
"version": "2.5.104", | ||
"version": "2.5.105", | ||
"license": "MIT", | ||
@@ -34,3 +34,3 @@ "type": "module", | ||
}, | ||
"gitHead": "3be73d07263ecdb28c3212d5cf1932b0dc7ba7e5", | ||
"gitHead": "c7835423b2cc2e3abbdb19c20aab56a6c952f47b", | ||
"devDependencies": { | ||
@@ -37,0 +37,0 @@ "@babel/core": "^7.12.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
188229
5100