I tried what made sense:
In the module below localStorage.foo works but localStorage.session_array['privacy'] returns undefined.
This is prototype code for modern broswsers.
var ISession = ( function ()
{
localStorage.session_array =
{
privacy: 0
};
localStorage.foo = 1;
var SessionI = function ( )
{
};
SessionI.prototype.get = function( type )
{
return localStorage.session_array[ type ];
};
SessionI.prototype.set = function( type, value )
{
localStorage.session_array[ type ] = value;
alert( '|' + localStorage.foo ); // returns 1
alert( '|' + localStorage.session_array[ 'privacy' ] ); // returns undefined
};
return SessionI;
} ) ();
In the mean while I'm just going to implement this using non array properties.