Christoph M. Becker
4/2/2016 4:58:00 PM
emf wrote:
> in my Eye Exercises I am using this borrowed full-screen function:
>
> [code]
>
> It works fine, however JSlint complains for the last line of code:
>
> Expected 'new' before 'wscript'.
> wscript.SendKeys("{F11}");
>
> Sincerely I do not understand what the problem is and what JSlint wants
> me to change -- the variable has been declared and has been assigned a
> value -- and adding new in front creates more problems and doesn't make
> sense to me. Can someone explain what the problem is and how it can be
> solved to JSlint's satisfaction?
I assume that JSLint assumes that wscript.SendKeys is a constructor
function, because SendKeys starts with a capital letter. Therefore
JSLint complains.
> also, I am curious, why did the author chose el as a variable name?
el is most likely an abbreviation of element.
> And do the experts of this newsgroup consider the code up-to-date?
I'm don't consider me an ES expert, so I can't comment. :)
--
Christoph M. Becker