Don't use escape. Use encodeURI or encodeURIComponent instead....
318
crlender
Dec 7, 2008 2:46 pm
... But what if the server can't handle UTF-8 encoded characters? Many legacy applications are stuck with escape/unescape. - Conrad...
319
Douglas Crockford
douglascrock...
Dec 7, 2008 4:44 pm
... /*global escape */...
320
michael.gollmick
michael.goll...
Dec 7, 2008 9:30 pm
... 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...
321
Chris
altearius
Dec 11, 2008 9:31 pm
The documentation suggests that this should work: /*jslint newcap: true */ or /*jslint newcap: false */ However, JSLint itself complains about this being a...
322
Douglas Crockford
douglascrock...
Dec 12, 2008 1:59 am
... Thanks for the report....
323
santini.alberto
Dec 12, 2008 3:04 pm
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 ...
324
aceblchboy
Dec 13, 2008 5:49 pm
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...
325
Douglas Crockford
douglascrock...
Dec 13, 2008 5:51 pm
... Just fix your code. Hooking JSLint into your editor can be very effective....
326
Daniel Cassidy
mail@...
Dec 16, 2008 2:24 pm
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...
327
Daniel Cassidy
mail@...
Dec 16, 2008 2:30 pm
Hi, With 'assume browser' turned on, JSLint rejects the following: if (n instanceof Document) { // 'Document39; is undefined // ... } Shouldn't the DOM classes...
328
Douglas Crockford
douglascrock...
Dec 16, 2008 3:00 pm
... Of course....
329
Douglas Crockford
douglascrock...
Dec 16, 2008 3:01 pm
... My understanding is that these are not universally implemented in all browsers, and so represent a portability trap....
330
mnewton32@...
mnewton32
Dec 16, 2008 3:26 pm
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 =...
331
Daniel Cassidy
mail@...
Dec 16, 2008 4:02 pm
... 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...
332
kaichen67@...
kaichen67
Dec 17, 2008 8:10 pm
... Try this: alert(document); alert(Document); Javascript is case sensitive!...
333
mnewton32@...
mnewton32
Dec 17, 2008 8:21 pm
Yes, JS is case sensitive; document is referring to a specific object that exists in all browsers, while Document refers to the class that object should be an...
334
Douglas Crockford
douglascrock...
Dec 19, 2008 11:24 pm
I made two changes to the way JSLint deals with HTML: 1. <!-- --> comments have been relaxed to allow the commenting out of HTML content. JSLint will complain...
335
santini.alberto
Dec 23, 2008 10:19 am
What about "let" keyword? https://developer.mozilla.org/en/New_in_JavaScript_1.7 For instance, for (let i = 0; i < 10; i = i + 1) { // loop stuff with local...
336
Douglas Crockford
douglascrock...
Dec 23, 2008 1:30 pm
... Of course not. let is not in the standard, and will not be in the next edition. If you care about standards compliance and portability, you will avoid it....
337
santini.alberto
Dec 23, 2008 9:12 pm
... Thanks... I know that... but I saw an intensive use of let keyword in the Mozilla extension Ubiquity. And I learn by example... :) Regards, Alberto...
338
Dion Almaer
dion_almaer
Dec 23, 2008 11:19 pm
I guess we will have to fork jslint to have a -mozilla option ;) On Tue, Dec 23, 2008 at 1:12 PM, santini.alberto ... [Non-text portions of this message have...
339
Stoyan Stefanov
ssttoobg
Dec 23, 2008 11:48 pm
Thanks Anton, (forwarding to the jslint group) YSlow has an older version of JSLint, so I pasted your test code into jslint.com and got a different error...
340
Douglas Crockford
douglascrock...
Dec 24, 2008 12:01 am
... The var statement var a = b = 123; is a common error, with people thinking they are declaring two local variables but in reality declaring one local...
341
halukakin
Dec 24, 2008 10:26 pm
Hi, I just checked the following small line of code with jslint: document.write('hello39;); And I got this error : "document.write can be a form of eval." I...
342
Douglas Crockford
douglascrock...
Dec 24, 2008 10:33 pm
... error. eval comes in several forms, and is usually to be avoided. document.write is the worst of them. If you wish to ignore this advice, check the...
343
Mordecai Dotan Hegykozi
lunarslover1979
Jan 1, 2009 7:30 am
Which ActiveX Object should I search for to cover for versions IE 6-8? I was told IE switched their ActiveX Obkect in IE 7 from "Microsoft.XMLHTTP" to...
344
crlender
Jan 8, 2009 1:44 pm
This function: function isValidBZ (val) { return /^(?:[1-9]92;d*|0)$/.test(val); } triggers the JSLint warning "Wrap the /regexp/ literal in parens to...
345
Douglas Crockford
douglascrock...
Jan 8, 2009 10:06 pm
... This case is decidable, which is why JavaScript parsers are able to work, but there are problems in the language because it can be difficult to determine...
346
M. Lorton
mlorton
Jan 9, 2009 9:43 pm
The current version of JSlint (at least on Rhino) only reads the Javascript from an existing file. If it could also optionally read from standard-input, I...