SVGHMI: cosmetic fix in Back widget
authorEdouard Tisserant
Fri, 04 Nov 2022 10:52:59 +0100
changeset 3654 6b7f15089703
parent 3653 d5ff60e906b0
child 3655 e42a09c1d3f3
SVGHMI: cosmetic fix in Back widget
svghmi/widget_back.ysl2
--- a/svghmi/widget_back.ysl2	Fri Nov 04 10:51:45 2022 +0100
+++ b/svghmi/widget_back.ysl2	Fri Nov 04 10:52:59 2022 +0100
@@ -9,7 +9,6 @@
     shortdesc > Jump to previous page
 }
 
-// TODO: use es6
 widget_class("Back")
     ||
         on_click(evt) {
@@ -24,6 +23,6 @@
             }
         }
         init() {
-            this.element.setAttribute("onclick", "hmi_widgets['"+this.element_id+"'].on_click(evt)");
+            this.element.onclick = this.on_click.bind(this);
         }
     ||