Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Illegal use of reserved words

#75

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.

Reported by Paul Bronshteyn aka pbcomm · August 23rd, 2009 @ 11:53 PM

State: resolved
Milestone: none
Assigned to: RightJS Admin RightJS Admin

Activity

  1. MadRabbit
    MadRabbit

    Did you run into any sort of problems with that?

    August 24th, 2009 @ 12:42 AM

  2. Paul Bronshteyn aka pbcomm
    Paul Bronshteyn aka pbcomm

    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.

    August 24th, 2009 @ 12:47 AM

  3. MadRabbit
    MadRabbit

    okay I see the point. Will fix it.

    Btw how is the result with YUI against FrontCompiler?

    August 24th, 2009 @ 08:15 AM

  4. Paul Bronshteyn aka pbcomm
    Paul Bronshteyn aka pbcomm

    It's 47k compressed, but gives much better performance gzipped.

    August 24th, 2009 @ 08:35 AM

  5. MadRabbit
    MadRabbit

    have you tried the custom build without the self-build feature?

    here
    http://rightjs.org/builds

    uncheck the 'self-build' checkbox. it should give you pretty much the same thing YUI builds.

    August 24th, 2009 @ 08:45 AM

  6. Paul Bronshteyn aka pbcomm
    Paul Bronshteyn aka pbcomm

    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.

    August 24th, 2009 @ 09:13 AM

  7. MadRabbit
    MadRabbit

    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.

    August 24th, 2009 @ 09:23 AM

  8. MadRabbit
    MadRabbit
    • State changed from new to resolved

    Okay, here it is. http://rightjs.org/download

    Thanks for help!

    August 24th, 2009 @ 09:34 AM

  9. Paul Bronshteyn aka pbcomm

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.