Comparing version 0.1.2 to 0.1.3
import { Suspense, use } from "hono/jsx/dom"; | ||
const buildCreateChildrenFn = (createElement) => { | ||
const createElementFromHTMLElement = async (element) => { | ||
const props = { | ||
children: await createChildren(element.childNodes) | ||
}; | ||
const attributes = element.attributes; | ||
for (let i = 0; i < attributes.length; i++) { | ||
props[attributes[i].name] = attributes[i].value; | ||
} | ||
return createElement(element.nodeName, props); | ||
}; | ||
const createChildren = async (childNodes) => { | ||
@@ -35,7 +45,3 @@ const children = []; | ||
} else { | ||
fallback.push( | ||
await createElement(child2.nodeName, { | ||
children: await createChildren(child2.childNodes) | ||
}) | ||
); | ||
fallback.push(await createElementFromHTMLElement(child2)); | ||
} | ||
@@ -69,7 +75,3 @@ } | ||
} else { | ||
children.push( | ||
await createElement(child.nodeName, { | ||
children: await createChildren(child.childNodes) | ||
}) | ||
); | ||
children.push(await createElementFromHTMLElement(child)); | ||
} | ||
@@ -76,0 +78,0 @@ } |
{ | ||
"name": "honox", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
64697
967