Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove the wrap because it should be no more necessary

cpojer say that is safe to remove everything. so blame him if is not.
  • Loading branch information...
commit 756bbafaad864a2ebf1a44051fc089adcfa55af5 1 parent b0de803
Cristian Carlesso authored
Showing with 1 addition and 12 deletions.
  1. +1 −12 Source/Element/Element.js
View
13 Source/Element/Element.js
@@ -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]);
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.