jsx-dom-runtime
Advanced tools
Comparing version 0.67.3 to 0.68.0
@@ -7,7 +7,7 @@ const svgNs = 'http://www.w3.org/2000/svg'; | ||
const extensions = new Map([['style', (node, value, key) => { | ||
if ('string' === typeof value) { | ||
if ('string' == typeof value) { | ||
node.setAttribute(key, value); | ||
} else { | ||
for (key in value) { | ||
if (key.startsWith('--')) { | ||
if (key.startsWith('-')) { | ||
node.style.setProperty(key, value[key]); | ||
@@ -38,3 +38,5 @@ } else { | ||
value, | ||
node = props._ ? document.createElementNS(props._, tag) : document.createElement(tag); | ||
node = props._ ? document.createElementNS(props._, tag) : document.createElement(tag, props.is ? { | ||
is: props.is | ||
} : key); | ||
for (key in props) { | ||
@@ -47,12 +49,14 @@ if (!internalKeys.has(key)) { | ||
node[key] = value; | ||
} else if (null != value && ('boolean' !== typeof value || '-' === key[4])) { | ||
node.setAttribute(key, value); | ||
} else if (value) { | ||
node.setAttribute(key, ''); | ||
} else if (null != value) { | ||
if ('boolean' != typeof value || key.startsWith('-', 4)) { | ||
node.setAttribute(key, value); | ||
} else if (value) { | ||
node.setAttribute(key, ''); | ||
} | ||
} | ||
} | ||
} | ||
appendChildren(props.children, 'template' === tag ? node.content : node); | ||
appendChildren(props.children, 'template' == tag ? node.content : node); | ||
if (value = props.ref) { | ||
if ('function' === typeof value) { | ||
if ('function' == typeof value) { | ||
value(node); | ||
@@ -59,0 +63,0 @@ } else { |
{ | ||
"name": "jsx-dom-runtime", | ||
"version": "0.67.3", | ||
"version": "0.68.0", | ||
"description": "A tiny in 500 bytes library to JSX syntax templates for DOM. Support HTML, SVG and MathML tags", | ||
@@ -40,3 +40,3 @@ "type": "module", | ||
"devDependencies": { | ||
"@babel/core": "^7.24.4", | ||
"@babel/core": "^7.24.5", | ||
"@babel/preset-typescript": "^7.24.1", | ||
@@ -52,4 +52,4 @@ "@evilmartians/lefthook": "^1.6.10", | ||
"@types/jest": "^29.5.12", | ||
"@typescript-eslint/eslint-plugin": "^7.7.1", | ||
"@typescript-eslint/parser": "^7.7.1", | ||
"@typescript-eslint/eslint-plugin": "^7.8.0", | ||
"@typescript-eslint/parser": "^7.8.0", | ||
"babel-jest": "^29.7.0", | ||
@@ -60,3 +60,3 @@ "babel-plugin-transform-lhs-constants": "^1.2.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"rollup": "^4.17.0", | ||
"rollup": "^4.17.2", | ||
"size-limit": "^11.1.2", | ||
@@ -63,0 +63,0 @@ "typescript": "^5.4.5" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
121627
3069