Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/dom/html/test/forms/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  test_option_text.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/dom/html/test/forms/test_option_text.html


<!doctype html>
<meta charset=utf-8>
<title>HTMLOptionElement.text</title>
<link rel=author title=Ms2ger href="mailto:Ms2ger@gmail.com">
<link rel=help href="http://www.whatwg.org/html/#dom-option-text">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
test(function() {
  var option = document.createElement("option");
  option.appendChild(document.createElement("font"))
        .appendChild(document.createTextNode(" font "));
  assert_equals(option.text, "font");
}, "option.text should recurse");
test(function() {
  var option = document.createElement("option");
  option.appendChild(document.createTextNode(" before "));
  option.appendChild(document.createElement("script"))
        .appendChild(document.createTextNode(" script "));
  option.appendChild(document.createTextNode(" after "));
  assert_equals(option.text, "before after");
}, "option.text should not recurse into HTML script elements");
test(function() {
  var option = document.createElement("option");
  option.appendChild(document.createTextNode(" before "));
  option.appendChild(document.createElementNS("http://www.w3.org/2000/svg""script"))
        .appendChild(document.createTextNode(" script "));
  option.appendChild(document.createTextNode(" after "));
  assert_equals(option.text, "before after");
}, "option.text should not recurse into SVG script elements");
test(function() {
  var option = document.createElement("option");
  option.appendChild(document.createTextNode(" before "));
  option.appendChild(document.createElementNS("http://www.w3.org/1998/Math/MathML""script"))
        .appendChild(document.createTextNode(" script "));
  option.appendChild(document.createTextNode(" after "));
  assert_equals(option.text, "before script after");
}, "option.text should recurse into MathML script elements");
test(function() {
  var option = document.createElement("option");
  option.appendChild(document.createTextNode(" before "));
  option.appendChild(document.createElementNS(null, "script"))
        .appendChild(document.createTextNode(" script "));
  option.appendChild(document.createTextNode(" after "));
  assert_equals(option.text, "before script after");
}, "option.text should recurse into null script elements");
test(function() {
  var option = document.createElement("option");
  var span = option.appendChild(document.createElement("span"));
  span.appendChild(document.createTextNode(" Some "));
  span.appendChild(document.createElement("script"))
      .appendChild(document.createTextNode(" script "));
  option.appendChild(document.createTextNode(" Text "));
  assert_equals(option.text, "Some Text");
}, "option.text should work if a child of the option ends with a script");
</script>

Messung V0.5
C=99 H=100 G=99

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.