Here's what's going on:
YUI Compressor 2.3.5, 2008-02-08
--------------------------------
+ Added a warning when more than one 'var' statement is used in a single scope.
Automatic coalescence is extremely complicated, and would be unsafe if not
done properly.
At first I thought it was bogus, but it turns out it's correct. Try
running this code and guess what the output is:
for (var i=0; i< 10; i++) {
document.write(i + " ");
document.write(" ");
}
document.write("<br>result is " + i);
1 2 3 4 5 6 7 8 9
result is 10
Digging deeper I find that javascript's local scope is only local to
the function. ... shudder ....
On Thu, Feb 21, 2008 at 05:30:02PM -0800, Cassie wrote:
> When running the shindig server these days we are now getting tons and tons
> of js warnings. It seems to be linting for some very weird things, the most
> prevalent being "Try to use a single 'var' statement per scope."
>
> Does anyone know how to turn off this particular warning? I don't think it
> is useful at all (using more than one var per scope in js is perfectly
> reasonable) and is hiding some of the hopefully more valuable warnings.
>
> Thanks!
>
> - Cassie
--
Paul Lindner
hi5 Architect
[EMAIL PROTECTED]
pgpcQ2uqLt70P.pgp
Description: PGP signature

