... Application/javascript is not working with IE. I will them continue to use and to recommend type="text/javascript" in every <script> About DOCTYPE, all...
This line works: var y = (arr[2] || "").toLowerCase(); This one doesn't (see output below): (arr[2] || "").toLowerCase(); By itself, that expression isn't very...
I have the following (useless) snippet: foo = 1; function bar() {} Ok... foo is implied global: I can resolve it with /*global foo */. Why is bar not an...
On Mon, Nov 10, 2008 at 5:31 PM, santini.alberto ... The following two statements are always exactly equivalent: function bar () {} var bar = function () {} ...
Daniel Cassidy
mail@...
Nov 11, 2008 3:22 pm
309
... Sorry for the delay... Usually I use the namespace approach or pseudo-block (function () {...}); In some cases, for instance, I forget the namespace part...
... For sure I have been missing something... :) I thought a global function was evil, but I see the misunderstanding. If I lint (JSLINT) the code "function...
I have added a new option: [ ] Require Initial Caps for constructors (option.newcap) I highly recommend that you always turn this option on. If you call a...
... Because the Yahoo! JSLint Widget is now very out of date, I offer my Widget Tester Widget (which includes JSLint) at http://tinyurl.com/5unocx . I...
Hi, while checking a script and reducing a lot of flaws in it with the webjslint, the following message came up: Problem at line 130 character 34: 'escape' is...
... absolutely - that was my solution too ;-) I just thought every browser implements that extension to the ECMA Script and thus expected it to disappear with...
The documentation suggests that this should work: /*jslint newcap: true */ or /*jslint newcap: false */ However, JSLint itself complains about this being a...
Maybe I am a bit out of topic, but the subject is the foundation of JSlint. :) Reading "Top Down Operator Precedence" paper [1] and trying to use his ...
When JSLint encounters a serious error, it stops. Is it possible to program in a error handling statement that breaks out of that block, outputs that lines x-y...
Hi, JSLint forbids the following form: var a = var b = foo(); // Expected an identifier and instead saw 'var'. Is this intentional? It can occasionally be...
Daniel Cassidy
mail@...
Dec 16, 2008 2:24 pm
327
Hi, With 'assume browser' turned on, JSLint rejects the following: if (n instanceof Document) { // 'Document' is undefined // ... } Shouldn't the DOM classes...
I believe the var declaration is not legal as the right side of a statement; it would require 'var b' to return a value, which it does not. Try: var a, b; a =...
... Uhh... sorry. It is of course a syntax error. Chalk that one up to temporary insanity on my part. I was thinking of another language where "var b" is an...