Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.46 KB

File metadata and controls

55 lines (40 loc) · 1.46 KB

DOM Renderer

A light-weight DOM Renderer supports Web components standard & TypeScript language.

CI & CD

Open in GitPod

NPM

Usage

JavaScript

import { DOMRenderer } from 'dom-renderer';

const newVNode = new DOMRenderer().patch(
    {
        tagName: 'body',
        node: document.body
    },
    {
        tagName: 'body',
        children: [
            {
                tagName: 'a',
                props: { href: 'https://idea2.app/' },
                style: { color: 'red' },
                children: [{ text: 'idea2app' }]
            }
        ]
    }
);

console.log(newVNode);

Original

Inspiration

SnabbDOM

Prototype

Edit DOM renderer