Hello
Wouldn't It make sense to empty() the element first, before Set the
innerHTML?
Or better not empty for performance reasons?
This is the actual code from mootools 1.2.3
var html = {
set: function(){
this.empty(); //
<--------------------------------------------- ????????
var html = Array.flatten(arguments).join('');
var wrap = Browser.Engine.trident &&
translations[this.get('tag')];
if (wrap){
var first = wrapper;
first.innerHTML = wrap[1] + html + wrap[2];
for (var i = wrap[0]; i--;) first =
first.firstChild;
this.empty().adopt(first.childNodes);
} else {
this.innerHTML = html;
}
}
};