microjungle JsonML to DocumentFragment

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

目前为 2018-01-08 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/25520/241821/microjungle%20JsonML%20to%20DocumentFragment.js

作者
Spooky Donkey
版本
3
创建于
2016-12-08
更新于
2018-01-08
大小
1.4 KB
许可证
暂无

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"));

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址