add new webui module

This commit is contained in:
Stewart Allen 2021-12-29 12:55:45 -05:00
commit fa65c7c67f
3 changed files with 27 additions and 22 deletions

23
src/moto/webui.js Normal file
View file

@ -0,0 +1,23 @@
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
"use strict";
gapp.register('moto.webui');
// some ui helpers that need to go into a ui class
function $(id) {
return document.getElementById(id);
}
function $d(id, v) {
$(id).style.display = v;
}
function $h(id, h) {
$(id).innerHTML = h;
}
function estop(evt) {
evt.stopPropagation();
evt.preventDefault();
}