| Page 1 of 1 | [ 4 posts ] |
|
Hi, I think I found a very strange behavior, I didn't look at the code of YUI Compressor, but something tells me that has something to do with Java.
java -jar /usr/local/sbin/yuic --charset utf-8 --type js <(echo "var long = 'test';") <-- error java -jar /usr/local/sbin/yuic --charset utf-8 --type js <(echo "var lang = 'test';") <-- ok It only happens when using the word 'long' as a variable, as an object property or as an unquoted json field. Can somebody confirm that 'long' is not a reserved word in javascript? I tested in several engines and looks like they don't have a problem with it. Regards |
|
Sorry, but just after that I found that 'long' is a very old javascript reserved word, so YUI Compressor is doing its job right. It's a pity to have reserved words like this that will be never used again, but it's also great that this library is backwards compatible with the oldest javascript code too.
Congrats for the nice tool |
|
long is a reserved word. JavaScript has many more reserved words that those actually in use.
|
|
I have an issue with YUI Java script file compression. We have an Ant task to build the project from SVN repository. Whenever a JS file is modified in SVN and build is run, that file is not compressed properly. Compressed file is appended with the original non compressed file...Any idea??
Thanks in advance!!! |
| Page 1 of 1 | [ 4 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group