Illegal use of reserved words
Reported by Paul Bronshteyn aka pbcomm | August 23rd, 2009 @ 11:53 PM
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 August 24th, 2009 @ 12:47 AM
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 August 24th, 2009 @ 08:15 AM
okay I see the point. Will fix it.
Btw how is the result with YUI against FrontCompiler?
-
Paul Bronshteyn aka pbcomm August 24th, 2009 @ 08:35 AM
It's 47k compressed, but gives much better performance gzipped.
-
MadRabbit August 24th, 2009 @ 08:45 AM
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 August 24th, 2009 @ 09:13 AM
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 August 24th, 2009 @ 09:23 AM
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 August 24th, 2009 @ 09:34 AM
- 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