diff --git a/src/lib/base.html b/src/lib/base.html index b12bfebe97..f58ec4b267 100644 --- a/src/lib/base.html +++ b/src/lib/base.html @@ -116,18 +116,19 @@ * object to a target object. * * @method extend - * @param {Object} prototype Target object to copy properties to. - * @param {Object} api Source object to copy properties from. - * @return {Object} prototype object that was passed as first argument. + * @param {?Object} target Target object to copy properties to. + * @param {?Object} source Source object to copy properties from. + * @return {?Object} Target object that was passed as first argument or + * source object if the target was null. */ - extend: function(prototype, api) { - if (prototype && api) { - var n$ = Object.getOwnPropertyNames(api); + extend: function(target, source) { + if (target && source) { + var n$ = Object.getOwnPropertyNames(source); for (var i=0, n; (i