Unresolved warnings for JavaScript alert() and window

In a JavaScript file with the following code

/**
* Created by billb on 11/14/2014.
*/

var test = 1;

var
todo = 1;

if
(window) {
   alert(test + todo);
}


I'm getting weak warnings for both "window" and "alert", specifically for "window" the warning is "unresolved variable or type window" and the warning for "alert" is "unresolved function or method alert()".  I'm running the trial version of PhpStorm 8.0.1 on Windows 7.

Why am I getting these warnings?  Both of these are language constructs of JavaScript.  I was working in a different JavaScript file earlier today and had no warnings like these and came back to that file and now the file is littered with warnings about window being unresolved and other things that shouldn't be warnings.

Any suggestions?

2 comments
Comment actions Permalink

I seem to have solved this by doing the following:

File menu ==> Invalidate Caches / Restart

This restarted PhpStorm and I'm not seeing the problem any more (so far).  

Has anyone else seen this problem before?  Do I need to do anything else?

I'm currently evaluating this product and I'm a bit concerned about erratic behaviour like this.  Hopefully this is not a common occurrence.

3
Comment actions Permalink

@Bill B.

Hi guy.

Thanks , it work.

Take me so much time to solve it.

install and uninstall again and again seem no work.

0

Please sign in to leave a comment.