diff --git a/src/browser/DomElement.js b/src/browser/DomElement.js index ef3c46c8..f8d31216 100644 --- a/src/browser/DomElement.js +++ b/src/browser/DomElement.js @@ -52,9 +52,9 @@ var DomElement = new function() { } return { - create: function(arg0, arg1) { - var isArray = Array.isArray(arg0), - res = create(isArray ? arg0 : arguments, isArray ? arg1 : null); + create: function(nodes, parent) { + var isArray = Array.isArray(nodes), + res = create(isArray ? nodes : arguments, isArray ? parent : null); return res.length == 1 ? res[0] : res; }, diff --git a/src/ui/Component.js b/src/ui/Component.js index 49c314a1..fd26f342 100644 --- a/src/ui/Component.js +++ b/src/ui/Component.js @@ -46,6 +46,7 @@ var Component = this.Component = Base.extend(Callback, /** @lends Component# */{ list: { tag: 'select', + options: function() { DomElement.removeChildren(this.element); DomElement.create(Base.each(this._options, function(option) { @@ -129,10 +130,9 @@ var Component = this.Component = Base.extend(Callback, /** @lends Component# */{ toFloat(DomElement.get(this.element, 'max'))]; }, - setRange: function(arg0, arg1) { - if (!Array.isArray(arg0)) - arg0 = [arg0, arg1]; - DomElement.set(this.element, { min: arg0[0], max: arg0[1] }); + setRange: function(min, max) { + var range = Array.isArray(min) ? min : [min, max]; + DomElement.set(this.element, { min: range[0], max: range[1] }); }, getMin: function() {