(From update of attachment 389264) >+ if (aField && aField.maxLength > -1) >+ result.wrappedJSObject.entries = result.wrappedJSObject.entries.filter(this._filterEntryLength, aField);
Use an inline anonymous function here...
foo = foo.filter(function (e) { return (element.text.length <= this.maxLength) });
(A refinement of having a local function in the if-block to do this, which would be my choice instead of having a tiny utility function stuck, at distance, onto the component's object).
(From update of attachment 389264) wrappedJSObject .entries = result. wrappedJSObject .entries. filter( this._filterEnt ryLength, aField);
>+ if (aField && aField.maxLength > -1)
>+ result.
Use an inline anonymous function here...
foo = foo.filter(function (e) { return (element. text.length <= this.maxLength) });
(A refinement of having a local function in the if-block to do this, which would be my choice instead of having a tiny utility function stuck, at distance, onto the component's object).