1.0.3 • Published 4 years ago

minidoc v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

minidoc

Tiny dom generator module

npm install minidoc

Usage

Just a little function to avoid all the document.createElement boilerplate.

const h = require('minidoc')

h('div', { class: 'someClass', onclick: () => { console.log('clicked it')}}, [
  'a text node',
  h('input', { value: 'Input field...'})
])

API

domElement = h(nameOrElement, [attrs,] [children])

Make a new dom element. Children can be a list of text nodes and dom elements.

License

MIT

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago