I suspect that this could potentially be a duplicate of Strict Violation using the keyword 'this' and the revealing module pattern
Here is the code snippet in question:
function navigateToPage(s){
if(s<=this.d&&s>0){this.g=s; this.page((s-1)*this.p.size);}
}
function pageTransition(event, sorter) {
var dd = event.currentTarget;
navigateToPage.call(sorter, dd[dd.selectedIndex].value);
}
Despite my efforts, JSHINT (or JSLINT) seems to have an issue with it. It specifically highlights "Strict violation." for the marked line.
Do you think utilizing Function.call()
followed by referencing the instance is not appropriate in this case?
Could this be viewed as poor coding etiquette?