I'm sure it was the confusion over reference vs. use with the single quote marks. You read '[' as indicating only the square bracket was the thing being...
The error is correct. Specifically there needs to be a space between the single quote character and the plus sign. /Jakob Fra: jslint_com@yahoogroups.com...
A good exemple var s = String(3); // typeof s === "string" var s = new String(3); // typeof s === "object" String() can be used to convert any value into a...
i have found a bug. when running the following code through JSLint, it gives me the error below. /*global define: false */ /*jslint newcap: true, onevar:...
1580
Stefan Weiss
weiss@...
Nov 9, 2010 11:46 am
... The error is not caused by calling the constructor itself, but by the attempt to use the "this value" as an object inside the constructor. In ES3, the...
But I read that invoking a constructor in ES5 without using the "new" keyword is an error. If that is true then there must be some way to distinguish between...
... var y = "\92;)abc92;\)fgh"; print(y); y = y.replace(/92;\92;)/g, "~PDpar~"); print(y); y = y.replace(/~PDpar~/g, "\92;)"); // leave out the third backslash print(y);...
Using JavaScript I am attempting to forcefully inject double quote characters into the parentheses of url fragments in CSS, so that url(jslint.com) becomes...
1576
Stefan Weiss
weiss@...
Nov 4, 2010 8:41 pm
... In ES5 (same as in ES3), a constructor is simply a function which creates and initializes objects. Letter case has nothing to do with it. Starting function...
Thanks! I'm trying to verify though that in ES5, not just in JSLint, the definition of a constructor is "a function whose name starts with an uppercase...
From my understanding calling a constructor without using new will mena the this pointer point to the global object and all the member function and varialbes...
I've read that in ES5, accessing the global object is a runtime error. Can someone explain what "accessing the global object" means? Does it mean that "this"...
I've combed the web for answers to these questions, but haven't found them ... even in the ES5 spec which surely contains the answers. In ES5 what is the...
... This post has a reasonable summary: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ In browsers today, the use strict directive does nothing....
ECMAScript 5 may be (negligably) faster, but the main benefit you get is in using/preparing to use a language that is more sane and developed and is the future...
Yes, I understand. But why should I? If I always drive the speed limit, why should I put a speed regulator on my car? There may very well be a reason, I...
1568
Rob Richardson
erobrich@...
Nov 2, 2010 5:57 pm
"use strict" identifies you're opting into the ECMAScript 5 mode of the same name. Rob ... From: jslint_com@yahoogroups.com [mailto:jslint_com@yahoogroups.com]...
I run all my JavaScript through a strict version of JSLint, run it with a careful eye toward any warning messages found in Firebug, and I think my code is...
Luke, ... There is no uniform length definition for a tab stop character. This is several problematic with consideration for text based documentation where...
I'd like to back Rob up - this is the only thing stopping me from switching on whitespace checking in jslint. I looked on the website for a reason and haven't...
1564
Rob Richardson
erobrich@...
Oct 26, 2010 4:48 am
The wonderment of html spacing spoils the day again ... JSLint prefers this: switch (somevar) { case 'a': \t// some code \tbreak; case 'b': \t// some code ...
1563
Rob Richardson
erobrich@...
Oct 26, 2010 3:03 am
JSLint doesn't barf if the last case doesn't end in a break or return. For example JSLint believes this is ok: switch (somevar) { case 'a': // some code ...
The problem of dealing with the many issues surrounding the tab character arose in the early days of computers. I remember first having to deal with it in the ...
... Just one nitpick: \s will replace all whitespace, including newlines. You probably want something more like this: x.replace(/92;t/g, " "); x.replace(/...
... It is also an indication that more than one person, each with different editing styles, has been in that file. You cannot force your peers to do exactly...
... Mixing tabs and space is an indication of an editing problem. Pick one or the other and use it consistently. Fix your code....
1558
Rob Richardson
erobrich@...
Oct 19, 2010 9:57 pm
JSLint highlights this as a problem: /* * My Library Descriptive Comment * some descriptive content here */ with a message about mixed tabs and spaces...
Ben, ... This is still an XML issue. Those browser have no issue with CSS applied to an XML file. IE can also render CSS files to XML documents directly, but...