I want to make a function that add an item to my localStorage object. E.g.:
alert(localStorage.getItem(\'names\').addItem(\'Bill\').getItem(\'names\'));
getItem('names').addItem('Bill').getItem('names')
I am confused, how do you get an item that has not been added???
getItem returns an object contains addItem method, and addItem method returns an object contains getItem method
Anyway, have a look the following tutorial. It does not completely solve your problem, but will give you an idea.
http://guanfenglin.spaces.live.com/blog/cns!4E0822BF6C959B7F!668.entry