Hi, I wouldn't call it a bug in Prototype. I'd be tempted to call it a bug in the browser implementations but I'd have to get more into it. The spec says these things are strings (specifically DOMStrings), which I would expect a reasonable implementation to map to a JavaScript string. But clearly they don't, as
On Apr 25, 4:33 pm, Nikoh <[email protected]> wrote: > I was wondering if anybody had come up against this. I'm trying out > something using DOM Storage (only for browsers that have the feature > such as FF, IE8, Safari 4) and noticed that the values coming out of > them aren't decorated with the String methods. The most useful one to > have is evalJSON since that makes it easy to store more complex data > in there, eg. > > var data = window.sessionStorage.myStorageAreaName.evalJSON(); > > But the method doesn't exist there. This works: > > var data = ("" + window.sessionStorage.myStorageAreaName).evalJSON(); > > Was just wondering if that's the recommended thing to do, or if maybe > it's a bug in Prototype and it could be decorating these string > values? This is on Firefox 3 - other browsers could behave differently. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
