/** * Utilities */ NodeList.prototype.forEach = Array.prototype.forEach; String.prototype.html_entity_decode = function() { var d = M4.createElement("div", {htmlText:this.toString()}); return d.firstChild.nodeValue; }; Function.prototype.proxy = function(pInstance) { var ref = this; return function(){ref.apply(pInstance, arguments);}; }; Object.clone = function(pData) { var obj = {}; for(var i in pData) { if(!pData.hasOwnProperty(i)) continue; obj[i] = pData[i]; } return obj; }; /** * Base Class * Overriding - toString - whatever */ function Class(){} Class.prototype = { super:function(pMethodName) { pMethodName = pMethodName||"constructor"; if(!this.__SUPER__||!this.__SUPER__[pMethodName]) throw new Error("Method '"+pMethodName+"' undefined"); var args = []; for(var i = 1, max = arguments.length;i0) { for(var i = 0, max=pExtends.length; i