BLANK_IMAGE_URL : "http:/"+"/localhost/s.gif",
emptyFn : function(){},
-
+
/**
* Copies all the properties of config to obj if they don't already exist.
* @param {Object} obj The receiver of the properties
} : function(ns, name){
var d = this.dom;
return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name];
+ },
+
+
+ /**
+ * Sets or Returns the value the dom attribute value
+ * @param {String} name The attribute name
+ * @param {String} value (optional) The value to set the attribute to
+ * @return {String} The attribute value
+ */
+ attr : function(name){
+ if (arguments.length > 1) {
+ this.dom.setAttribute(name, arguments[1]);
+ return arguments[1];
+ }
+ if (!this.dom.hasAttribute(name)) {
+ return undefined;
+ }
+ return this.dom.getAttribute(name);
}
+
+
+
};
var ep = El.prototype;
// covert the html into DOM...
var doc = false;
+ var div =false;
try {
doc = document.implementation.createHTMLDocument("");
+ doc.documentElement.innerHTML = this.html ;
+ div = doc.documentElement;
} catch (e) {
- // old IE...
- doc = new ActiveXObject("htmlfile");
+ // old IE... - nasty -- it causes all sorts of issues.. with
+ // images getting pulled from server..
+ div = document.createElement('div');
+ div.innerHTML = this.html;
}
//doc.documentElement.innerHTML = htmlBody
- var div = doc.documentElement;
- div.innerHTML = this.html ;
+
+
this.tpls = [];
var _t = this;
return "'"+ sep + udef_st + format + name + args + "))"+sep+"'";
}
- if (args.length) {
+ if (args && args.length) {
// called with xxyx.yuu:(test,test)
// change to ()
return "'"+ sep + udef_st + name + '(' + args + "))"+sep+"'";