JSLint insists that there's something wrong with this use of .call:
function GridView(tableArray, tableId, multiselect) {
"use strict";
if (multiselect == undefined) {
this.multiselect = false;
} else {
this.multiselect = multiselect;
}
this.tableID = tableId;
this.propertiesArr = [];
this.tableHTML = undefined;
this.oTable = undefined;
this._constructTable.call(this, tableArray);
}
Is wrong. Well, Unexpected, anyway. I just can't for the life of me figure out why, is there something wrong with the code? It seems to work, but I'm worried about unexpected behavior.
The cause of the warning is the following line:
this._constructTable.call(this, tableArray);
This construct appears to be largely pointless - you are calling the _constructTable
method in the context of this
, which would be the same context it would be called in if you called it via a normal call expression. JSLint is expecting exactly that:
this._constructTable(tableArray);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With