Skip to content

Commit

Permalink
moved has extend-dojo feature to dojo/kernel; refs #13959; fixes #134…
Browse files Browse the repository at this point in the history
…84; !strict

git-svn-id: http://svn.dojotoolkit.org/src/dojo/trunk@26612 560b804f-0ae3-0310-86f3-f6aa0a117693
  • Loading branch information
rcgill committed Sep 21, 2011
1 parent 1ef89bd commit b8983b7
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions _base/array.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(["./kernel", "./lang"], function(dojo, lang){
define(["./kernel", "../has", "./lang"], function(dojo, has, lang){
// module:
// dojo/_base/array
// summary:
Expand Down Expand Up @@ -336,7 +336,7 @@ define(["./kernel", "./lang"], function(dojo, lang){
clearCache: clearCache
};

lang.mixin(dojo, array);
has("extend-dojo") && lang.mixin(dojo, array);

/*===== return dojo.array; =====*/
return array;
Expand Down
4 changes: 2 additions & 2 deletions _base/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function connect_(obj, event, context, method, dontFix){
}
if(typeof event == "string" && event.substring(0, 2) == "on"){
event = event.substring(2);
}
}
if(!obj){
obj = kernel.global;
}
Expand Down Expand Up @@ -204,7 +204,7 @@ var connect = {
};
connect.unsubscribe = connect.disconnect;

has("dojo-1x-base") && lang.mixin(kernel, connect);
has("extend-dojo") && lang.mixin(kernel, connect);
return connect;

/*=====
Expand Down
2 changes: 1 addition & 1 deletion _base/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ define(["./kernel", "../dom", "../dom-style", "../dom-attr", "../dom-prop", "../
// module:
// dojo/dom
// summary:
// This module is a stub fot the core dojo DOM API.
// This module is a stub for the core dojo DOM API.

// mix-in dom
dojo.byId = dom.byId;
Expand Down
8 changes: 8 additions & 0 deletions _base/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ define(["../has", "./config", "require", "module"], function(has, config, requir
}
};


// If has("extend-dojo") is truthy, then as a dojo module is defined it should push it's definitions
// into the dojo object, and conversely. In 2.0, it will likely be unusual to augment another object
// as a result of defining a module. This has feature gives a way to force 2.0 behavior as the code
// is migrated. Absent specific advice otherwise, set extend-dojo to truthy.
has.add("extend-dojo", 1);

if(has("dojo-loader")){
dojo.eval = require.eval;
}else{
Expand Down Expand Up @@ -271,5 +278,6 @@ define(["../has", "./config", "require", "module"], function(has, config, requir
}

dojo._hasResource = {}; // for backward compatibility with layers built with 1.6 tooling

return dojo;
});
2 changes: 1 addition & 1 deletion _base/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ define(["./kernel", "../has", "./sniff"], function(dojo, has){
replace:replace
};

has("dojo-1x-base") && mixin(dojo, lang);
has("extend-dojo") && mixin(dojo, lang);
return lang;

/*=====
Expand Down
1 change: 0 additions & 1 deletion dojo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,6 @@
"dojo-sniff":1,
"dojo-sync-loader":1,
"dojo-test-sniff":1,
"dojo-1x-base":1,
"config-tlmSiblingOfDojo":1
},
packages:[{
Expand Down

0 comments on commit b8983b7

Please sign in to comment.