1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-24 21:13:33 +01:00

Move marks to storage module.

This commit is contained in:
Kris Maglione
2008-09-12 00:41:36 +00:00
parent 5608c04d00
commit 40f1c185e8
5 changed files with 57 additions and 47 deletions

View File

@@ -191,20 +191,20 @@ var storage = {
this.__defineGetter__(key, function () keys[key]);
},
newObject: function newObject(key, store)
newMap: function newMap(key, store)
{
// TODO: Add type checking.
if (key in keys)
return;
this._addKey(key, new ObjectStore(key, store));
if (!(key in keys))
this._addKey(key, new ObjectStore(key, store));
return this[key];
},
newArray: function newArray(key, store)
{
// TODO: Add type checking.
if (key in keys)
return;
this._addKey(key, new ArrayStore(key, store));
if (!(key in keys))
this._addKey(key, new ArrayStore(key, store));
return this[key];
},
addObserver: function addObserver(key, callback)