Skip to content

Releases: svileng/docrel

v1.4.3

03 Jan 13:30
5884e77
Compare
Choose a tag to compare

Add missing canvas helper tag to the list of exported functions.

Issues closed:

  • Add canvas element to exports [#2]

v1.4.2

07 Dec 12:23
8593877
Compare
Choose a tag to compare

Fixing previous release which didn't had the extra tags transpiled to ES5 for use.

v1.4.1

07 Dec 12:19
Compare
Choose a tag to compare

Adding support for missing HTML elements ol and progress.

v1.4.0

30 Nov 14:47
b27a105
Compare
Choose a tag to compare

Element helpers for common HTML elements are now exported by docrel, so instead of using the create function to create the elements, you can now just do:

import {div, input, button} from "docrel"

before:

import {create} from "docrel"
const [div, input, button] = create("div", "input", "button")

The create function is still available, so both of the examples above will work.

v1.3.0

10 Nov 14:18
e0c89b7
Compare
Choose a tag to compare

You can now use the create helper function to build createElement functions, like so:

import {create} from "docrel"
let [div] = create("div")

The create function accepts string arguments that correspond to HTML tag names, and returns an array of createElement functions.

You can then use those functions to pass the remaining createElement params, like options and children:

let wrapperDiv = div({class: "div-a"}, [div({class: "nested-div"})])

The createElement function is used behind the scenes and is still available.

v1.2.0

05 Nov 14:31
b0678ef
Compare
Choose a tag to compare

Added id and class shorthand options to the createElement constructor.

createElement("div", {id: "id", class: "foo bar"})

The class shorthand sets element.className to the given value:

https://developer.mozilla.org/en-US/docs/Web/API/Element/className