vdom 0.1Virtual DOM API for Fantom
The vdom
pod provides a virtual DOM API for Fantom designed to be used with the core dom
pod library:
// create vdom tree v1 := VElem("h1") { it->style = "color: blue" it.text = "Hello, World" } // initial render to DOM node elem := VDom.render(v1) // generate a new vdom tree v2 := VElem("h1") { it->style = "color: red" it.text = "Hello, World" } // patch existing DOM with changes VDom.patch(elem, v2)
Install
To install vdom with Fantom Pod Manager, cut'n'paste the following into a cmd prompt, terminal or shell:
Or to install vdom with the Fantom Repository Manager (fanr), cut'n'paste the following into a cmd prompt, terminal or shell:
Or to install manually, download the pod file and copy it to the %FAN_HOME%/lib/fan/
directory.
Use
To use vdom in a Fantom project, add a dependency to the project's build.fan
:
depends = ["sys 1.0", ..., "vdom 0.1"]
Documentation
Information
Meta information on the vdom pod:
- Published by
- afrankvt
- Pod file size
- 25.34 kB
- Licence
- MIT
- Built on
- 19th Dec 2018
- Source code
- via Git at https://github.com/afrankvt/vdom
- Depends on
- dom, sys, web
- Referenced by
- Javascript Compatible
Dependency Graph
Use mouse to re-position pods