From 9a2f4670f35fd874ebb4be3f20e2d0de87271263 Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 9 Apr 2012 02:50:59 +0900 Subject: Use __iterator__ --- direct_bookmark.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direct_bookmark.js b/direct_bookmark.js index 0a565f0..b9ed189 100644 --- a/direct_bookmark.js +++ b/direct_bookmark.js @@ -601,6 +601,7 @@ for Migemo search: require XUL/Migemo Extension let (_tags = {}, _empty = true) { __context__.tags = { + __iterator__: function () (v for ([v, ] in Iterator(_tags))), update: function (atags) { _tags = {}; _empty = atags.length === 0; @@ -610,7 +611,6 @@ for Migemo search: require XUL/Migemo Extension add: function (newTag) { _tags[newTag] = true; }, - get list () Object.keys(_tags), get isEmpty () _empty, }; } @@ -812,7 +812,7 @@ for Migemo search: require XUL/Migemo Extension context.incomplete = true; getTagsAsync(set.bind(null, context)).call([]); } else { - set(context, __context__.tags.list); + set(context, __context__.tags); } }); }, -- cgit v1.2.3