dist/hello.all.js
function(node, attr, target) {

		var n = typeof (node) === 'string' ? document.createElement(node) : node;

		if (typeof (attr) === 'object') {
			if ('tagName' in attr) {
				target = attr;
			}
			else {
				for (var x in attr) {if (attr.hasOwnProperty(x)) {
					if (typeof (attr[x]) === 'object') {
						for (var y in attr[x]) {if (attr[x].hasOwnProperty(y)) {
							n[x][y] = attr[x][y];
						}}
					}
					else if (x === 'html') {
						n.innerHTML = attr[x];
					}

					// IE doesn't like us setting methods with setAttribute
					else if (!/^on/.test(x)) {
						n.setAttribute(x, attr[x]);
					}
					else {
						n[x] = attr[x];
					}
				}}
			}
		}

		if (target === 'body') {
			(function self() {
				if (document.body) {
					document.body.appendChild(n);
				}
				else {
					setTimeout(self, 16);
				}
			})();
		}
		else if (typeof (target) === 'object') {
			target.appendChild(n);
		}
		else if (typeof (target) === 'string') {
			document.getElementsByTagName(target)[0].appendChild(n);
		}

		return n;
	}
function(node, attr, target) {

		var n = typeof (node) === 'string' ? document.createElement(node) : node;

		if (typeof (attr) === 'object') {
			if ('tagName' in attr) {
				target = attr;
			}
			else {
				for (var x in attr) {if (attr.hasOwnProperty(x)) {
					if (typeof (attr[x]) === 'object') {
						for (var y in attr[x]) {if (attr[x].hasOwnProperty(y)) {
							n[x][y] = attr[x][y];
						}}
					}
					else if (x === 'html') {
						n.innerHTML = attr[x];
					}

					// IE doesn't like us setting methods with setAttribute
					else if (!/^on/.test(x)) {
						n.setAttribute(x, attr[x]);
					}
					else {
						n[x] = attr[x];
					}
				}}
			}
		}

		if (target === 'body') {
			(function self() {
				if (document.body) {
					document.body.appendChild(n);
				}
				else {
					setTimeout(self, 16);
				}
			})();
		}
		else if (typeof (target) === 'object') {
			target.appendChild(n);
		}
		else if (typeof (target) === 'string') {
			document.getElementsByTagName(target)[0].appendChild(n);
		}

		return n;
	}
function ( node , attr , target ) { var n = typeof ( node ) === 'string' ? document . createElement ( node ) : node ; if ( typeof ( attr ) === 'object' ) { if ( 'tagName' in attr ) { target = attr ; } else { for ( var x in attr ) { if ( attr . hasOwnProperty ( x ) ) { if ( typeof ( attr [ x ] ) === 'object' ) { for ( var y in attr [ x ] ) { if ( attr [ x ] . hasOwnProperty ( y ) ) { n [ x ] [ y ] = attr [ x ] [ y ] ; } } } else if ( x === 'html' ) { n . innerHTML = attr [ x ] ; } // IE doesn't like us setting methods with setAttribute else if ( ! / ^on / . test ( x ) ) { n . setAttribute ( x , attr [ x ] ) ; } else { n [ x ] = attr [ x ] ; } } } } } if ( target === 'body' ) { ( function self ( ) { if ( document . body ) { document . body . appendChild ( n ) ; } else { setTimeout ( self , 16 ) ; } } ) ( ) ; } else if ( typeof ( target ) === 'object' ) { target . appendChild ( n ) ; } else if ( typeof ( target ) === 'string' ) { document . getElementsByTagName ( target ) [ 0 ] . appendChild ( n ) ; } return n ; }
Create and Append new DOM elements @param node string @param attr object literal @param dom/string
Create and Append new DOM elements