Skip to content

Commit

Permalink
remove the wrap because it should be no more necessary
Browse files Browse the repository at this point in the history
cpojer say that is safe to remove everything. so blame him if is not.
  • Loading branch information
Cristian Carlesso authored and Cristian Carlesso committed Sep 2, 2012
1 parent b0de803 commit 756bbaf
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Source/Element/Element.js
Expand Up @@ -898,13 +898,7 @@ Element.implement({
[Element, Window, Document].invoke('implement', {

addListener: function(type, fn){
if (type == 'unload'){
var old = fn, self = this;
old.$ref = fn = function(){
self.removeListener('unload', fn);
old();
};
} else if (window.attachEvent && !window.addEventListener){
if (window.attachEvent && !window.addEventListener){
collected[Slick.uidOf(this)] = this;
}
if (this.addEventListener) this.addEventListener(type, fn, !!arguments[2]);
Expand All @@ -913,11 +907,6 @@ Element.implement({
},

removeListener: function(type, fn){
if (type == 'unload' && fn.$ref){
var old = fn;
fn = fn.$ref;
delete old.$ref;
}
if (this.removeEventListener) this.removeEventListener(type, fn, !!arguments[2]);
else this.detachEvent('on' + type, fn);
return this;
Expand Down

0 comments on commit 756bbaf

Please sign in to comment.