0.0.8 • Published 9 years ago

json2dom-js v0.0.8

Weekly downloads
2
License
-
Repository
github
Last release
9 years ago

json2dom-js

It will make HTML DOM from json format file.

Install

npm install json2dom-js

Sample Code

class Controller {
  beforeContentCreate(data){
    // some action for before create 'Content' element
    return true;
  }
}
const ctl = new Controller();
const Json2Dom = require('json2dom-js');
const j2d = new Json2Dom(ctl);
j2d.load('path/to/format.js').then((dom) => {
  const target = document.getElementById('target');
  target.appendChild(dom);
});

Sample JSON

{
  "$wrapper": {
    "type": "div",
    "style": "width: 100%; position:relative; margin:0 auto, background-color:#000;",
    "$content": {
      "type": "div"
    }
  }
}

Author

kuro-daei

Repository

GitHub

Lisence

Apache-2.0

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago