/* fabric.js */
if(typeof document == "undefined") {
	/*var document = {}*/
	console.info("no document object")
}
var fabric = (function() {
	function init() {
		mark("init"); var test = new Hello("init").toString(); info(test)
	}
	function mark(label) {
		if(!label) label = "undefined";
		try {
			var meta = document.createElement("meta"); meta.setAttribute("name", "fabricjs-"+label); meta.setAttribute("content", new Date())
			var root = document.getElementsByTagName("head")[0]
			//if(document.getElementsByTagName("head")[0]!=null) root = document.getElementsByTagName("head")[0];
			root.appendChild(meta)
	//		root.insertBefore(meta)
		}
		catch(e) { console.info("error:"+e); }
	}
	function set(callback) {
		callback()
	}
	function info(message) {
		try {
			var div = document.createElement("div"); div.appendChild(document.createTextNode(message))
		}
		catch(e) { console.info("error:"+e); }
	}
	function warn(message) {}
	function Hello(name) {
		this.name = name; this.toString = function(){ return "Hello@"+this.name; }
	}
	return { init:init, mark:mark, set:set, info:info, warn:warn, Hello:Hello };
})();
// ----------------------------------------------------------------
fabric.init();
fabric.set(function() { return "set"; });
fabric.info(new fabric.Hello("test").toString());
fabric.warn("Hallo verden !");
fabric.mark("completed");

