From d0faa62a0108cc9118b4b606992a559ace2fbe85 Mon Sep 17 00:00:00 2001 From: ianb Date: Sun, 17 Jul 2005 22:47:17 +0000 Subject: Simplified extend() --- examples/filebrowser/js-lib/prototype-1.2.0.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'examples/filebrowser') diff --git a/examples/filebrowser/js-lib/prototype-1.2.0.js b/examples/filebrowser/js-lib/prototype-1.2.0.js index a7cae53..47916bc 100644 --- a/examples/filebrowser/js-lib/prototype-1.2.0.js +++ b/examples/filebrowser/js-lib/prototype-1.2.0.js @@ -26,12 +26,10 @@ var Class = { var Abstract = new Object(); function extend(ob1, ob2) { - return (function(object) { - for (property in object) { - this[property] = object[property]; - } - return this; - }).apply(ob1, [ob2]); + for (property in ob2) { + ob1[property] = ob2[property]; + } + return ob1; } Function.prototype.bind = function(object) { -- cgit v1.2.1