0.1.0 • Published 7 years ago

html-it v0.1.0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
7 years ago

HTML It

A cool and uncluttered way to generate html right from JS.

Example

// Excpet for the first argument, all arguments can be in whatever order.
var myButton = h(
    'input',                           // Tag name is always the first argument.
    '#myId',                           // Id begins with #
    '.class1',                         // Classes begin with .
    '.class2',                         // Classes begin with .
    '@disabled',                       // Boolean attributes begin with @
    '@readonly',                       // Boolean attributes begin with @
    ':title=Press to press',           // Attributes begin with :
    ':type=text',                      // Attributes begin with :
    'Click Here!',                     // Regular inner text.
    [ document.createElement('span') ] // Array of DOM elements to bi children.
);

For Browser

Use the file at /dist.

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago