microjungle JsonML to DocumentFragment

Based on https://github.com/deepsweet/microjungle by Kir Belevich

Acest script nu ar trebui instalat direct. Aceasta este o bibliotecă pentru alte scripturi care este inclusă prin directiva meta a // @require https://update.greasyfork.org/scripts/25520/241821/microjungle%20JsonML%20to%20DocumentFragment.js

Autor
Spooky Donkey
Versiune
3
Creat
08-12-2016
Actualizat
08-01-2018
Licență
N/A

const mj = new MicrojungleJsonMLtoDocumentFragment();
const jm = [["div", {class: "fun"}, "hello"]];
mj(jm).firstElementChild.outerHTML === "<div class=\"fun\">hello</div>";//true


const mj = new MicrojungleJsonMLtoDocumentFragment();
const jm = [["div", {id: "appendedNode"}, "hello"]];
mj(jm, document.querySelector("#appendToThis"));