class View extends Events

pull/1441/head
Simon Legner 1 year ago
parent bf65faea85
commit 5e0b6a4e59

@ -4,16 +4,12 @@
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS206: Consider reworking classes to avoid initClass
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.View = class View {
static initClass() {
$.extend(this.prototype, Events);
}
app.View = class View extends Events {
constructor(el) {
super();
if (el instanceof HTMLElement) {
this.el = el;
}
@ -27,9 +23,9 @@ app.View = class View {
this.refreshElements();
if (typeof this.init === "function") {
this.init();
}
this.refreshElements();
}
}
setupElement() {
if (this.el == null) {
@ -260,4 +256,3 @@ app.View = class View {
$.remove(this.el);
}
};
app.View.initClass();

Loading…
Cancel
Save