From 988772ba37d280263817242d2a421c58ea8ba244 Mon Sep 17 00:00:00 2001 From: bringert Date: Thu, 4 Jan 2007 22:01:38 +0000 Subject: [PATCH] JavaScript lib: allow children as arguments to Fun. --- lib/javascript/gflib.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/javascript/gflib.js b/lib/javascript/gflib.js index a570bbb3e..ed57fe443 100644 --- a/lib/javascript/gflib.js +++ b/lib/javascript/gflib.js @@ -2,6 +2,9 @@ function Fun(name) { this.name = name; + for (var i = 1; i < arguments.length; i++) { + this.setChild(i-1, arguments[i]); + } } Fun.prototype.print = function () { return this.show(0); } ; Fun.prototype.show = function (prec) {