Rename Event listener

Remove hacks
This commit is contained in:
Paulo Veiga
2011-08-21 12:42:00 -03:00
parent 0e854c8942
commit ad13c296ad
42 changed files with 276 additions and 2944 deletions

View File

@@ -1075,7 +1075,7 @@ if (document.execCommand) try {
} catch (e){}
/*<ltIE9>*/
if (this.attachEvent && !this.addEventListener){
if (this.attachEvent && !this.addEvent){
var unloadEvent = function(){
this.detachEvent('onunload', unloadEvent);
document.head = document.html = document.window = null;
@@ -3348,13 +3348,13 @@ if (!document.createElement('div').contains) Element.implement(contains);
} else {
collected[$uid(this)] = this;
}
if (this.addEventListener) this.addEventListener(type, fn, !!arguments[2]);
if (this.addEvent) this.addEvent(type, fn, !!arguments[2]);
else this.attachEvent('on' + type, fn);
return this;
},
removeListener: function(type, fn){
if (this.removeEventListener) this.removeEventListener(type, fn, !!arguments[2]);
if (this.removeEvent) this.removeEvent(type, fn, !!arguments[2]);
else this.detachEvent('on' + type, fn);
return this;
},
@@ -3380,7 +3380,7 @@ if (!document.createElement('div').contains) Element.implement(contains);
});
/*<ltIE9>*/
if (window.attachEvent && !window.addEventListener) window.addListener('unload', function(){
if (window.attachEvent && !window.addEvent) window.addListener('unload', function(){
Object.each(collected, clean);
if (window.CollectGarbage) CollectGarbage();
});