1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 07:32:25 +01:00

Fix Bookmark* autocommand events.

Struct now only offers values during iteration like Array.
This commit is contained in:
Doug Kearns
2015-06-24 00:15:42 +10:00
parent ccfc69bc01
commit 5eece742e1
2 changed files with 6 additions and 2 deletions

View File

@@ -1405,6 +1405,10 @@ var StructBase = Class("StructBase", Array, {
get: function struct_get(key, val) this[this.members[key]],
set: function struct_set(key, val) this[this.members[key]] = val,
toObject: function struct_toObject() {
return iter.toObject([k, this[k]] for (k of keys(this.members)));
},
toString: function struct_toString() Class.prototype.toString.apply(this, arguments),
// Iterator over our named members