Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exports.sym_appendHTMLFragment = @Symbol("appendHTMLFragment")
- exports.appendHTMLFragment = function (x, node) {
- if (Array.isArray(x)) {
- array ..@each(function (x) {
- exports.appendHTMLFragment(x, node)
- })
- } else if (typeof x === "string") {
- node.appendChild(document.createTextNode(escapeString(x)))
- } else if (x != null) {
- x[sym_appendHTMLFragment](x, node)
- }
- }
- exports.appendContent = function (dom, fragment, block) {
- appendHTMLFragment(fragment, dom)
- // Handle other stuff, like block
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement