add ams tray selector

This commit is contained in:
Stewart Allen 2025-02-10 17:00:25 -05:00
commit f1e5ccae1a
3 changed files with 48 additions and 10 deletions

View file

@ -33,9 +33,14 @@ function build(data, context) {
html.push(`<${type}`);
let func = {};
for (let [key, val] of Object.entries(attr || {})) {
if (val === undefined) {
continue;
}
let tov = typeof val;
if (key === '_') {
text = val;
} else if (key.startsWith('_')) {
if (val) html.push(` ${key.substring(1)}`);
} else if (key === 'id') {
elid = val ? (tov === 'object' ? val.join('_') : val) : undefined;
} else if (tov === 'function') {