more refactoring ...

This commit is contained in:
zadam
2020-01-12 20:15:05 +01:00
parent 9d81bf030d
commit bf7541bfb9
13 changed files with 260 additions and 248 deletions

View File

@@ -8,20 +8,18 @@ class BasicWidget {
}
render() {
const $widget = $('<div>').attr('id', this.widgetId);
// actual rendering is async
this.doRender($widget);
const $widget = this.doRender();
// $widget.attr('id', this.widgetId);
return $widget;
}
/**
* for overriding
*
* @param {JQuery} $widget
*/
async doRender($widget) {}
doRender() {}
eventReceived(name, data) {
const fun = this[name + 'Listener'];