make model/group subclass to inherit common ops

This commit is contained in:
Stewart Allen 2021-12-31 13:26:07 -05:00
commit a5ddd78299
4 changed files with 76 additions and 59 deletions

View file

@ -96,13 +96,16 @@ let h = self.h = moto.webui = {
} else {
el.innerHTML = html;
}
let map = {};
for (let bind of ctx) {
let { elid, func } = bind;
let et = $(elid);
map[elid] = et;
for (let [name, fn] of Object.entries(func)) {
et[name] = fn;
}
}
return map;
},
el: (type, attr, innr) => {