Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 (isQuasi(x)) {
- // handle quasis
- } else if (isFragment(x)) {
- // handle DOM fragment
- } else if (x != null) {
- // handle other stuff
- }
- }
- exports.appendContent = function (dom, fragment, block) {
- appendHTMLFragment(fragment, dom)
- // Handle other stuff, like block
- }
Advertisement
Add Comment
Please, Sign In to add comment