Static reserved word

9 views
Skip to first unread message

Kostrowsky

unread,
Feb 7, 2010, 3:59:43 PM2/7/10
to jsTree
Howdy,

Was wondering why the YUI Compressor and my javascript editor
(Eclipse) were complaining about jquery.tree.js...

The culprit is the 6 code lines which contains:

opts.static

Since static is a javascript reserved word, any compressor compliant
with the ECMA script standard would choke on these lines.

I simply replaced opts.static by opts['static'].

Just a headup to the programmer.

John Arrowwood

unread,
Feb 7, 2010, 4:27:30 PM2/7/10
to jst...@googlegroups.com
There are other reserved words that some browsers choke on.  For example, if you tried to do foo.class, Safari chokes on it.  I never tried using foo['class'], I just used a different field name...

That is a good note to Ivan, though.  YUI compressor shouldn't choke...


--
You received this message because you are subscribed to the Google Groups "jsTree" group.
To post to this group, send email to jst...@googlegroups.com.
To unsubscribe from this group, send email to jstree+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jstree?hl=en.




--
John Arrowwood
John (at) Irie (dash) Inc (dot) com
John (at) Arrowwood Photography (dot) com
John (at) Hanlons Razor (dot) com
--
http://www.irie-inc.com/
http://arrowwood.blogspot.com/

vakata

unread,
Feb 13, 2010, 9:13:17 AM2/13/10
to jsTree
Thank you - already fixed in 1.0.
Used jsLint and YUI compressor to validate.

Kindest regards,
Ivan

On 7 Фев, 23:27, John Arrowwood <jarro...@gmail.com> wrote:
> There are other reserved words that some browsers choke on.  For example, if
> you tried to do foo.class, Safari chokes on it.  I never tried using
> foo['class'], I just used a different field name...
>
> That is a good note to Ivan, though.  YUI compressor shouldn't choke...
>

> On Sun, Feb 7, 2010 at 12:59 PM, Kostrowsky <francois.x.h...@gmail.com>wrote:
>
>
>
> > Howdy,
>
> > Was wondering why the YUI Compressor and my javascript editor
> > (Eclipse) were complaining about jquery.tree.js...
>
> > The culprit is the 6 code lines which contains:
>
> > opts.static
>
> > Since static is a javascript reserved word, any compressor compliant
> > with the ECMA script standard would choke on these lines.
>
> > I simply replaced opts.static by opts['static'].
>
> > Just a headup to the programmer.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "jsTree" group.
> > To post to this group, send email to jst...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > jstree+un...@googlegroups.com<jstree%2Bunsu...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages