From 0571ab3aa79396e47e996d93a97643fd3a4e42a0 Mon Sep 17 00:00:00 2001 From: Garrick Cheung Date: Wed, 11 Jul 2012 00:49:47 -0700 Subject: [PATCH 1/2] Update files to not throw an error in "use strict" mode. #2379 --- Source/Browser/Browser.js | 2 +- Source/Class/Class.Extras.js | 2 +- Source/Class/Class.js | 2 +- Source/Core/Core.js | 2 +- Source/Element/Element.js | 2 +- Source/Fx/Fx.js | 2 +- Source/Request/Request.js | 2 +- Source/Types/DOMEvent.js | 2 +- Source/Types/Object.js | 2 +- Source/Utilities/Swiff.js | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Browser/Browser.js b/Source/Browser/Browser.js index 9f7c85b49..28f771789 100644 --- a/Source/Browser/Browser.js +++ b/Source/Browser/Browser.js @@ -250,4 +250,4 @@ this.$exec = Browser.exec; // -})(); +}).call(this); diff --git a/Source/Class/Class.Extras.js b/Source/Class/Class.Extras.js index 66f3348f4..03528e183 100644 --- a/Source/Class/Class.Extras.js +++ b/Source/Class/Class.Extras.js @@ -118,4 +118,4 @@ this.Options = new Class({ }); -})(); +}).call(this); diff --git a/Source/Class/Class.js b/Source/Class/Class.js index 220e3cd6d..928f3aa1f 100644 --- a/Source/Class/Class.js +++ b/Source/Class/Class.js @@ -112,4 +112,4 @@ Class.Mutators = { } }; -})(); +}).call(this); diff --git a/Source/Core/Core.js b/Source/Core/Core.js index bd3c9dfb4..314e65fb8 100644 --- a/Source/Core/Core.js +++ b/Source/Core/Core.js @@ -518,4 +518,4 @@ this.$unlink = function(object){ // -})(); +}).call(this); diff --git a/Source/Element/Element.js b/Source/Element/Element.js index 16b7bb374..d2229fb14 100644 --- a/Source/Element/Element.js +++ b/Source/Element/Element.js @@ -365,7 +365,7 @@ Element.implement('hasChild', function(element){ return match.call(this, node, selector); }; -})(Slick.search, Slick.find, Slick.match); +}).call(this, Slick.search, Slick.find, Slick.match); // diff --git a/Source/Fx/Fx.js b/Source/Fx/Fx.js index 7f85e28b9..7016e98bf 100644 --- a/Source/Fx/Fx.js +++ b/Source/Fx/Fx.js @@ -176,4 +176,4 @@ var pullInstance = function(fps){ } }; -})(); +}).call(this); diff --git a/Source/Request/Request.js b/Source/Request/Request.js index 41b36703d..7725c0cda 100644 --- a/Source/Request/Request.js +++ b/Source/Request/Request.js @@ -275,4 +275,4 @@ Element.implement({ }); -})(); +}).call(this); diff --git a/Source/Types/DOMEvent.js b/Source/Types/DOMEvent.js index d5ab908d3..0c3ea9c91 100644 --- a/Source/Types/DOMEvent.js +++ b/Source/Types/DOMEvent.js @@ -111,7 +111,7 @@ DOMEvent.defineKeys({ '46': 'delete', '13': 'enter' }); -})(); +}).call(this); /*<1.3compat>*/ var Event = DOMEvent; diff --git a/Source/Types/Object.js b/Source/Types/Object.js index 02298c713..0b4d6f706 100644 --- a/Source/Types/Object.js +++ b/Source/Types/Object.js @@ -116,7 +116,7 @@ Object.extend({ }); -})(); +}).call(this); //<1.2compat> diff --git a/Source/Utilities/Swiff.js b/Source/Utilities/Swiff.js index 50c3b9f2b..26449d281 100644 --- a/Source/Utilities/Swiff.js +++ b/Source/Utilities/Swiff.js @@ -110,4 +110,4 @@ Swiff.remote = function(obj, fn){ return eval(rs); }; -})(); +}).call(this); From 7deb6b2542e713a66e15b11415511551a3981d27 Mon Sep 17 00:00:00 2001 From: Garrick Cheung Date: Wed, 11 Jul 2012 14:18:11 -0700 Subject: [PATCH 2/2] Change to use 'this.window || global' because the behavior is not as expected in node env for #2380 --- Source/Browser/Browser.js | 2 +- Source/Class/Class.Extras.js | 2 +- Source/Class/Class.js | 2 +- Source/Core/Core.js | 2 +- Source/Element/Element.js | 2 +- Source/Fx/Fx.js | 2 +- Source/Request/Request.js | 2 +- Source/Types/DOMEvent.js | 2 +- Source/Types/Object.js | 2 +- Source/Utilities/Swiff.js | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Browser/Browser.js b/Source/Browser/Browser.js index 28f771789..30c90d87a 100644 --- a/Source/Browser/Browser.js +++ b/Source/Browser/Browser.js @@ -250,4 +250,4 @@ this.$exec = Browser.exec; // -}).call(this); +}).call(this.window || global); diff --git a/Source/Class/Class.Extras.js b/Source/Class/Class.Extras.js index 03528e183..a35a7e79f 100644 --- a/Source/Class/Class.Extras.js +++ b/Source/Class/Class.Extras.js @@ -118,4 +118,4 @@ this.Options = new Class({ }); -}).call(this); +}).call(this.window || global); diff --git a/Source/Class/Class.js b/Source/Class/Class.js index 928f3aa1f..2d3105e4a 100644 --- a/Source/Class/Class.js +++ b/Source/Class/Class.js @@ -112,4 +112,4 @@ Class.Mutators = { } }; -}).call(this); +}).call(this.window || global); diff --git a/Source/Core/Core.js b/Source/Core/Core.js index 314e65fb8..f0e4f8fd3 100644 --- a/Source/Core/Core.js +++ b/Source/Core/Core.js @@ -518,4 +518,4 @@ this.$unlink = function(object){ // -}).call(this); +}).call(this.window || global); diff --git a/Source/Element/Element.js b/Source/Element/Element.js index d2229fb14..96f114139 100644 --- a/Source/Element/Element.js +++ b/Source/Element/Element.js @@ -1058,4 +1058,4 @@ if (document.createElement('div').getAttributeNode('id')) Element.Properties.id }; /**/ -})(); +}).call(this.window || global); diff --git a/Source/Fx/Fx.js b/Source/Fx/Fx.js index 7016e98bf..0047854b9 100644 --- a/Source/Fx/Fx.js +++ b/Source/Fx/Fx.js @@ -176,4 +176,4 @@ var pullInstance = function(fps){ } }; -}).call(this); +}).call(this.window || global); diff --git a/Source/Request/Request.js b/Source/Request/Request.js index 7725c0cda..ae8e666e5 100644 --- a/Source/Request/Request.js +++ b/Source/Request/Request.js @@ -275,4 +275,4 @@ Element.implement({ }); -}).call(this); +}).call(this.window || global); diff --git a/Source/Types/DOMEvent.js b/Source/Types/DOMEvent.js index 0c3ea9c91..fbc9bd917 100644 --- a/Source/Types/DOMEvent.js +++ b/Source/Types/DOMEvent.js @@ -111,7 +111,7 @@ DOMEvent.defineKeys({ '46': 'delete', '13': 'enter' }); -}).call(this); +}).call(this.window || global); /*<1.3compat>*/ var Event = DOMEvent; diff --git a/Source/Types/Object.js b/Source/Types/Object.js index 0b4d6f706..02298c713 100644 --- a/Source/Types/Object.js +++ b/Source/Types/Object.js @@ -116,7 +116,7 @@ Object.extend({ }); -}).call(this); +})(); //<1.2compat> diff --git a/Source/Utilities/Swiff.js b/Source/Utilities/Swiff.js index 26449d281..119885ab9 100644 --- a/Source/Utilities/Swiff.js +++ b/Source/Utilities/Swiff.js @@ -110,4 +110,4 @@ Swiff.remote = function(obj, fn){ return eval(rs); }; -}).call(this); +}).call(this.window || global);