Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

move patch hook to loader instantiation time

This hook needs to happen earlier if we want to capture all the work
that loader does during instantiation.
  • Loading branch information...
commit 821d423fda7fc86d5e8b48a4537ee208573bebc3 1 parent 2356879
@ekashida authored
Showing with 10 additions and 10 deletions.
  1. +10 −0 src/loader/js/loader.js
  2. +0 −10 src/yui/js/yui.js
View
10 src/loader/js/loader.js
@@ -110,6 +110,16 @@ Y.Loader = function(o) {
//Catch no config passed.
o = o || {};
+ // Hook to patch loader
+ if (!Y._patched && Y.config.patches) {
+ (function (patches, len, i) {
+ Y._patched = true;
+ for (i = 0, len = patches.length; i < len; i += 1) {
+ patches[i](Y, self);
+ }
+ }(Y.config.patches));
+ }
+
modulekey = META.md5;
/**
View
10 src/yui/js/yui.js
@@ -160,16 +160,6 @@ available.
Y.instanceOf = instanceOf;
- // Hook to patch intialized instance
- if (!Y._patched && Y.config.patches) {
- (function (patches, len, i) {
- Y._patched = true;
- for (i = 0, len = patches.length; i < len; i += 1) {
- patches[i](Y);
- }
- }(Y.config.patches));
- }
-
return Y;
};
Please sign in to comment.
Something went wrong with that request. Please try again.