Trying to validate some Javascript in JsHint, and I get the following:
Possible strict violation:
return ($.event.dispatch || $.event.handle).apply(this, args);
Any ideas why it's throwing that error?
Thanks guys
Trying to validate some Javascript in JsHint, and I get the following:
Possible strict violation:
return ($.event.dispatch || $.event.handle).apply(this, args);
Any ideas why it's throwing that error?
Thanks guys
JSHint isn't sure whether the function that code is in will be called with an actual this
.
To tell JSHint how the function will be called and suppress this warning, add /*jshint validthis: true */
to the top of the function.