alert( Object.isString( "foo" )); // alerts "string" alert( Object.isString( new String( "foo" ) )); // alerts "object"
I know why this happens - because Prototype uses the underlying typeof's understanding of type. Personally I think this is a bug though - Javascript is just being difficult here and Prototype should make stuff like this easier. It should return "string" regardless of how the string was created. Anyone agree I should file this as a bug, or is there a good reason the current behaviour is desirable? Cheers, Jim -- Jim Higson my blog: http://jimhigson.blogspot.com/ wikizzle: http://wikizzle.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---