Skip to content
This repository

error “Object doesn't support this property or method” on last character when using javascript closures and wsh.js #617

Closed
dieseltravis opened this Issue · 0 comments

2 participants

travis Anton Kovalyov
travis

More info: http://stackoverflow.com/questions/11991432/jshint-error-object-doesnt-support-this-property-or-method-for-javascript-clo

test.js:

(function (w, $) {})(window, jQuery);

command:

%systemroot%\system32\cscript.exe //U //Nologo "%userprofile%\Documents\jshint\env\wsh.js" /forin:true /noarg:true /noempty:true /eqeqeq:true /bitwise:true /undef:true /unused:true /browser:true /jquery:true /indent:4 /maxerr:500 test.js

output:

[./test.js]
Line 1 character 37: Object doesn't support this property or method

Expected something along the lines of this from r09:

Line 1: (function (w, $) {})(window, jQuery);
'w' is defined but never used.

Line 1: (function (w, $) {})(window, jQuery);
'$' is defined but never used.
Anton Kovalyov valueof closed this issue from a commit
Anton Kovalyov valueof Add a shim for Array.prototype.indexOf
Apparently, whatever JavaScript engine WSH uses, it doesn't support
Array.prototype.indexOf method so I had to add a shim for it. I took
the original version from MDN and modified it to pass our lint tests.

Closes GH-617.
c047ea1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.