svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 3268 d22782b9591f
parent 3264 51645afeded9
child 3276 c696ecf5173a
equal deleted inserted replaced
3267:5f20f391ae31 3268:d22782b9591f
  7554 </xsl:text>
  7554 </xsl:text>
  7555           <xsl:text>
  7555           <xsl:text>
  7556 </xsl:text>
  7556 </xsl:text>
  7557           <xsl:text>// Open WebSocket to relative "/ws" address
  7557           <xsl:text>// Open WebSocket to relative "/ws" address
  7558 </xsl:text>
  7558 </xsl:text>
  7559           <xsl:text>var ws = new WebSocket(window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws'));
  7559           <xsl:text>
       
  7560 </xsl:text>
       
  7561           <xsl:text>var ws_url = 
       
  7562 </xsl:text>
       
  7563           <xsl:text>    window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws')
       
  7564 </xsl:text>
       
  7565           <xsl:text>    + '?mode=' + (window.location.hash == "#watchdog" 
       
  7566 </xsl:text>
       
  7567           <xsl:text>                  ? "watchdog"
       
  7568 </xsl:text>
       
  7569           <xsl:text>                  : "multiclient");
       
  7570 </xsl:text>
       
  7571           <xsl:text>var ws = new WebSocket(ws_url);
  7560 </xsl:text>
  7572 </xsl:text>
  7561           <xsl:text>ws.binaryType = 'arraybuffer';
  7573           <xsl:text>ws.binaryType = 'arraybuffer';
  7562 </xsl:text>
  7574 </xsl:text>
  7563           <xsl:text>
  7575           <xsl:text>
  7564 </xsl:text>
  7576 </xsl:text>