RobG wrote:
Michael Peters wrote:
> [EMAIL PROTECTED] wrote:
> > Hello,
> >
> > I've noticed that when you put a ',' at the end of the last effect, IE
> > doesn't work.
>
> It doesn't work because it's not really correct.
Not correct in what way? It is legal ECMAScript syntax, however it is
interpreted incorrectly by IE which will add an extra element to the
array. Therefore it may be "not correct" because Effect.Parallel
expects all elements in the array to have been assigned a value.
> Firefox allows it
Because Firefox follows the ECMAScript specification. A trailing comma
in an Array literal should not create an extra element, however in IE
it will create an extra element with an unassigned value.
I'll correct that. IE increments the length, which is still incorrect
and within a for loop is equivalent to adding an element with value
'undefined'. It should only increment the length for elisions that
aren't at the end of the element list. e.g.
var x = [ 1, ,2 ]; // length = 3;
var x = [ 1, 2, ]; // length = 2;
IE will give a length of 3 for both.
As a bit of trivia, if a for..in loop is used, IE will get it right
since there is no element with index 3. :-)
--
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---