mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 09:42:28 +01:00
Use the debugger for object property completion.
This commit is contained in:
@@ -29,7 +29,23 @@ function array(obj) {
|
||||
return util.Array(obj);
|
||||
}
|
||||
|
||||
function allkeys(obj) {
|
||||
let ret = {};
|
||||
for (; obj; obj = obj.__proto__) {
|
||||
services.get("debugger").wrapValue(obj).getProperties(ret, {});
|
||||
for (let prop in values(ret.value))
|
||||
yield prop.name.stringValue;
|
||||
}
|
||||
}
|
||||
|
||||
function keys(obj) {
|
||||
if (modules.services) {
|
||||
let ret = {};
|
||||
services.get("debugger").wrapValue(obj).getProperties(ret, {});
|
||||
for (let prop in values(ret.value))
|
||||
yield prop.name.stringValue;
|
||||
return;
|
||||
}
|
||||
if ('__iterator__' in obj) {
|
||||
var iter = obj.__iterator__;
|
||||
yield '__iterator__';
|
||||
|
||||
Reference in New Issue
Block a user