Was using your excellent foundation this morning on a mobile
site we are working on. Found that it returns a
'NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7' on selfclosing
elements in WebKit @ least e.g.:
el.appendChild(new Element('img',
{'src':'/images/vehicle-search/soldflaglist.gif','class':'soldflag'}));
The following fix to Element method seems to fix he issue:
/* * Simplified element creation function * @param type
{string} The type of element to create. * @param atts {object}
Attributes to attached to the HTMLElement. (optional) * @param
content {string} Set the innerHTML of the element. (optional)
/ var Element = function(type, atts, content) {
this.el = document.createElement(type);
for(var attr in atts) {
this.el.setAttribute(attr, atts[attr]);
}
if (!(/(area|base|basefont|br|hr|img|input|link|meta)/).test(type)) //ND - added this line to filter self closing
this.el.innerHTML = content || '';
return this.el;
};