what-core 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/dom.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "what-core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "What Framework - The closest framework to vanilla JS",
5
5
  "type": "module",
6
6
  "main": "dist/what.js",
package/src/dom.js CHANGED
@@ -25,6 +25,9 @@ export function mount(vnode, container) {
25
25
  function createDOM(vnode, parent) {
26
26
  if (vnode == null || vnode === false || vnode === true) return null;
27
27
 
28
+ // Real DOM node (from compiler runtime) — pass through
29
+ if (typeof Node !== 'undefined' && vnode instanceof Node) return vnode;
30
+
28
31
  // Text
29
32
  if (typeof vnode === 'string' || typeof vnode === 'number') {
30
33
  return document.createTextNode(String(vnode));