# HG changeset patch
# User Edouard Tisserant
# Date 1669286876 -3600
# Node ID f41733be17a8973b8cf8dffecf1d41761355fd37
# Parent  0e886fcc56f9eb667731553ddd1d62fe65f858ec
SVGHMI: move declaration of "xmlns" javascript const so that widgets can use it.

This was broken in earlier commit, when changing initial execution order because of implementing websocket reconnect.

diff -r 0e886fcc56f9 -r f41733be17a8 svghmi/inline_svg.ysl2
--- a/svghmi/inline_svg.ysl2	Thu Nov 24 10:54:58 2022 +0100
+++ b/svghmi/inline_svg.ysl2	Thu Nov 24 11:47:56 2022 +0100
@@ -209,6 +209,7 @@
 const "result_svg_ns", "exsl:node-set($result_svg)";
 
 emit "preamble:inline-svg" {
+    | const xmlns = "http://www.w3.org/2000/svg";
     | let id = document.getElementById.bind(document);
     | var svg_root = id("«$svg/@id»");
 }
diff -r 0e886fcc56f9 -r f41733be17a8 svghmi/svghmi.js
--- a/svghmi/svghmi.js	Thu Nov 24 10:54:58 2022 +0100
+++ b/svghmi/svghmi.js	Thu Nov 24 11:47:56 2022 +0100
@@ -666,7 +666,6 @@
 
 create_ws()
 
-const xmlns = "http://www.w3.org/2000/svg";
 var edit_callback;
 const localtypes = {"PAGE_LOCAL":null, "HMI_LOCAL":null}
 function edit_value(path, valuetype, callback, initial) {