Use attributes for class selection

This commit is contained in:
Ian Gulliver
2019-07-16 17:28:47 +00:00
parent a66bee672d
commit 0ddefeeaef
2 changed files with 26 additions and 23 deletions

View File

@@ -14,15 +14,12 @@ class List {
return ret;
}
queryEntries(query, type) {
queryEntries(query) {
let ret = [];
for (let elem of this.container_.querySelectorAll(query)) {
if (!elem.xArchObj) {
continue;
}
if (type && !(elem.xArchObj instanceof type)) {
continue;
}
ret.push(elem.xArchObj);
}
return ret;