dh_ackergaul
vor 3 Tagen 5bbf43c1b146439ab882815c12ed6292f1d7b4df
manufacturer/_furnview/_global/html/h/pingTest.html
@@ -8,6 +8,25 @@
  <script>
    const PORT = new URL(document.location.href).searchParams.get("port");
    // ===== DhPostMessageDll In-Process Ping-Pong (kein localhost-Webserver noetig) =====
    // Antwort von C++ kommt hier an (erwartet "pong:ping").
    window.dhOnMessage = function (msg) {
      if (msg == "pong:ping");
      document.title = "#success#CefSharp.PostMessage.Ping#";
    };
    function dhSendPing() {
      try {
        if (window.CefSharp && window.CefSharp.PostMessage) {
          CefSharp.PostMessage("ping");
        } else {
          document.title = "#failure#CefSharp.PostMessage nicht verfuegbar#";
        }
      } catch (e) {
        document.title = "#failure#CefSharp.PostMessage " + e.message + "#";
      }
    }
    window.addEventListener("load", dhSendPing);
    function pingTestLocal(callback) {
      try {
        var xhr = new XMLHttpRequest();