svghmi/svghmi.js
changeset 3455 2716cd8e498d
parent 3451 302efcf746e0
child 3512 fce3d407bb46
equal deleted inserted replaced
3454:0b5ab53007a9 3455:2716cd8e498d
    16 };
    16 };
    17 
    17 
    18 function init_widgets() {
    18 function init_widgets() {
    19     Object.keys(hmi_widgets).forEach(function(id) {
    19     Object.keys(hmi_widgets).forEach(function(id) {
    20         let widget = hmi_widgets[id];
    20         let widget = hmi_widgets[id];
    21         let init = widget.init;
    21         widget.do_init();
    22         if(typeof(init) == "function"){
       
    23             try {
       
    24                 init.call(widget);
       
    25             } catch(err) {
       
    26                 console.log(err);
       
    27             }
       
    28         }
       
    29         if(widget.forced_frequency !== undefined)
       
    30             widget.frequency = widget.forced_frequency;
       
    31     });
    22     });
    32 };
    23 };
    33 
    24 
    34 // Open WebSocket to relative "/ws" address
    25 // Open WebSocket to relative "/ws" address
    35 var has_watchdog = window.location.hash == "#watchdog";
    26 var has_watchdog = window.location.hash == "#watchdog";