-
Notifications
You must be signed in to change notification settings - Fork 21
/
fastFrag.min.js
2 lines (2 loc) · 940 Bytes
/
fastFrag.min.js
1
2
(function(){function g(a){var b;if(a&&a.length===undefined){b=h(a);f.appendChild(b)}else{var c=e.createDocumentFragment(),d;for(d in a){b=h(a[d]);c.appendChild(b)}return c}return f}function h(a){var b;if(a.text!==undefined)b=e.createTextNode(a.text||"");else{b=e.createElement(a.type||"div");if(a.attributes||a.attr||a.attrs){var c=a.attributes||a.attr||a.attrs;for(var d in c)if(!(d==="disabled"&&!c[d]))if(d.toLowerCase()==="style")b.cssText=b.style.cssText=c[d];else b.setAttribute(d,e.createTextNode(c[d]).nodeValue.toString())}b.id=
a.id?a.id:null;b.className=a.css?a.css:null;b=b;c=null;c=typeof a.content;if(c==="object")c=g(a.content);else if(c==="string")c=e.createTextNode(a.content);else{a=a.content!==undefined?a.content.toString()||"":"";c=e.createTextNode(a)}a=c;try{b.appendChild(a)}catch(i){}}return b}window.fastFrag={create:function(a){f=e.createDocumentFragment();return g(a)},version:"1.1.3"};var e=document,f=null})();