Illegal use of reserved words
Reported by Paul Bronshteyn aka pbcomm | 2009-08-23 23:53:41 UTC
On lines 4163 and 4165 reserved words are used as object
keys.
Words short and long cannot be used as keys or vars.
Use 'short' or 'long' as keys to keep the same naming
conventions.
Comments and changes to this ticket
-

-

Paul Bronshteyn aka pbcomm 2009-08-24 00:47:36 UTC
Yes. While trying to minify using YUI Compressor the compiler return 66 errors. But in general it is not the best practice to used any language reserved words.
-

MadRabbit 2009-08-24 08:15:29 UTC
okay I see the point. Will fix it.
Btw how is the result with YUI against FrontCompiler?
-

Paul Bronshteyn aka pbcomm 2009-08-24 08:35:03 UTC
It's 47k compressed, but gives much better performance gzipped.
-

MadRabbit 2009-08-24 08:45:18 UTC
have you tried the custom build without the self-build feature?
here
http://rightjs.org/buildsuncheck the 'self-build' checkbox. it should give you pretty much the same thing YUI builds.
-

Paul Bronshteyn aka pbcomm 2009-08-24 09:13:26 UTC
Yes, very close. 47.6k vs 46.3 with YUI.
I would also suggest going through some of the for loops which still is some cases use i < var.length, and would also suggest using === everywhere for better performance.
Might also want to store navigator.userAgent is browser as ua: navigator.userAgent and using this.ua will save a few bites.Going through the code to see if I can chop of a bit more of it.
There is also a mistype in cookie documentation "new Cooke" instead of "new Cookie". Get, remove and set are also there twice.
-

MadRabbit 2009-08-24 09:23:18 UTC
I've just had 47.5 with YUI 2.4.2 and RightJS 1.4.1
There are two methods at Cookie a class level and instance level
I've fixed the keywords and docs, and pushed the things to git. Will update the build in a minute.
-

MadRabbit 2009-08-24 09:34:18 UTC
- State changed from new to resolved
Okay, here it is. http://rightjs.org/download
Thanks for help!
-

Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
RightJS Core Tickets