Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  window_websocket_wss.html   Sprache: HTML

 

 products/Sources/formale Sprachen/C/Firefox/dom/websocket/tests/window_websocket_wss.html


<html><body>
Creating WebSocket
<iframe id="frame" sandbox="allow-scripts"></iframe>
<script type="application/javascript">

function cleanup() {
  window.document.getElementById("frame").removeAttribute("src");
  window.document.getElementById("frame").remove();
}

onmessage = function(e) {
  cleanup();
  window.opener.postMessage(e.data, '*');
}

// Mixed content blocker will prevent loading iframes via http, so in that case pass back the error
window.document.getElementById("frame").onerror = function() {
  cleanup();
  window.opener.postMessage("Error - iframe not loaded", '*');
}

// Load one of the iframe variants?
if (location.search == '?https_iframe_wss') {
  window.document.getElementById("frame").src = "https://example.com/tests/dom/websocket/tests/iframe_websocket_wss.html";
} else if (location.search == '?https_iframe_ws') {
  window.document.getElementById("frame").src = "https://example.com/tests/dom/websocket/tests/iframe_websocket_wss.html?insecure";
} else if (location.search == '?http_iframe_wss' || location.search == '?http_iframe_ws') {
  let iFrameUrl = "http://example.com/tests/dom/websocket/tests/iframe_websocket_wss.html";
  if (location.search == '?http_iframe_ws') {
    iFrameUrl += "?insecure";
  }
  window.document.getElementById("frame").src = iFrameUrl;
}
else {
  try {
    let socket;
    if (location.search == '?insecure') {
      socket = new WebSocket('ws://mochi.test:8888/tests/dom/websocket/tests/file_websocket_hello');
    }
    else {
      socket = new WebSocket('wss://example.com/tests/dom/websocket/tests/file_websocket_hello');
    }
    socket.onerror = function() {
      cleanup();
      window.opener.postMessage("WS onerror", "*");
    };
    socket.onopen = function() {
      socket.close();
      cleanup();
      window.opener.postMessage("WS onopen", "*");
    };
  }
  catch(e) {
    if (e.name == 'SecurityError') {
      cleanup();
      window.opener.postMessage("SecurityError", "*");
    } else {
      cleanup();
      window.opener.postMessage("Test Throws", "*");
    }
  }
}

</script>
</body></html>

Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.20Angebot  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-27) ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126864
#Domains=1897691