1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-10 12:25:45 +01:00

Make autocompletion generally more reasonable

This commit is contained in:
Kris Maglione
2008-10-06 18:48:08 +00:00
parent 4860ff32fe
commit 899fa605e6
8 changed files with 97 additions and 66 deletions

View File

@@ -107,11 +107,7 @@ function ObjectStore(name, store, data)
object = {};
};
this.__iterator__ = function ()
{
for (let key in object)
yield [key, object[key]];
};
this.__iterator__ = function () Iterator(object);
}
ObjectStore.prototype = prototype;
@@ -170,11 +166,7 @@ function ArrayStore(name, store, data)
return index >= 0 ? array[index] : array[array.length + index];
};
this.__iterator__ = function ()
{
for (let i = 0; i < array.length; i++)
yield [i, array[i]];
};
this.__iterator__ = function () Iterator(array);
}
ArrayStore.prototype = prototype;
@@ -208,9 +200,8 @@ var storage = {
{
if (!(key in observers))
observers[key] = [];
if (observers[key].indexOf(callback) >= 0)
return;
observers[key].push(callback);
if (observers[key].indexOf(callback) == -1)
observers[key].push(callback);
},
removeObserver: function (key, callback)