Permalink
Browse files

* Implement and extend internal methods don't need to return this bec…

…ause they are always overloaded. Adding Specs to check for return values of the public methods.
  • Loading branch information...
1 parent 00af077 commit 3edb200554b1f7240bba90855c7a1dd226b269b0 @cpojer cpojer committed Feb 3, 2011
Showing with 3 additions and 6 deletions.
  1. +2 −5 Source/Core/Core.js
  2. +1 −1 Specs
View
@@ -186,7 +186,7 @@ var hooksOf = function(object){
};
var implement = function(name, method){
- if (method && method.$hidden) return this;
+ if (method && method.$hidden) return;
var hooks = hooksOf(this);
@@ -202,15 +202,12 @@ var implement = function(name, method){
if (this[name] == null && typeOf(method) == 'function') extend.call(this, name, function(item){
return method.apply(item, slice.call(arguments, 1));
});
-
- return this;
};
var extend = function(name, method){
- if (method && method.$hidden) return this;
+ if (method && method.$hidden) return;
var previous = this[name];
if (previous == null || !previous.$protected) this[name] = method;
- return this;
};
Type.implement({
2 Specs
Submodule Specs updated 2 files
+39 −31 1.3base/Core/Core.js
+1 −1 Runner

0 comments on commit 3edb200

Please sign in to comment.