diff options
| author | ianb <devnull@localhost> | 2005-07-17 22:47:17 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-07-17 22:47:17 +0000 |
| commit | d0faa62a0108cc9118b4b606992a559ace2fbe85 (patch) | |
| tree | e42ed54998fa71cabbb4db732d327b68742b8029 /examples | |
| parent | 6e551df13defede485cab46dbce167d102500bba (diff) | |
| download | paste-d0faa62a0108cc9118b4b606992a559ace2fbe85.tar.gz | |
Simplified extend()
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/filebrowser/js-lib/prototype-1.2.0.js | 10 |
1 files changed, 4 insertions, 6 deletions
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) { |
