Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/editor/libeditor/tests/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  test_nested_editor.html   Sprache: HTML

 
 products/Sources/formale Sprachen/C/Firefox/editor/libeditor/tests/test_nested_editor.html


<!DOCTYPE html>
<html>
<head>
  <title> Test for nested contenteditable elements </title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head>
<body>
  <template id="focus-iframe-contenteditable-in-div">
    <div contenteditable>
      <iframe srcdoc="
"
></iframe>
    </div>
  </template>

  <template id="focus-contenteditable-parent-along-with-iframe">
    <div id='focusme' contenteditable></div>
    <iframe srcdoc="
"
></iframe>
  </template>

  <template id="focus-iframe-textarea-in-div">
    <div contenteditable>
      <iframe srcdoc=""></iframe>
    </div>
  </template>

  <template id="focus-textarea-parent-along-with-iframe">
    <textarea id='focusme' contenteditable></textarea>
    <iframe srcdoc="
"
></iframe>
  </template>
<script>
"use strict";

async function runTest() {
  function findFocusme() {
    return new Promise(r => {
      let focusInParent = document.getElementById("focusme");
      if (focusInParent) {
        r(focusInParent);
        return;
      }
      document.querySelector("iframe").addEventListener("load", function() {
        return r(document.querySelector("iframe").contentDocument.getElementById("focusme"));
      });
    });
  }

  const focusme = await findFocusme();

  focusme.focus();
  synthesizeKey("abc");

  if (focusme.nodeName === "TEXTAREA") {
    is(focusme.value, "abc");
  } else {
    is(focusme.innerHTML, "abc");
  }
}

SimpleTest.waitForExplicitFinish();

SimpleTest.waitForFocus(async () => {
  for (const template of document.querySelectorAll("template")) {
    const content = template.content.cloneNode(true);
    document.body.appendChild(content);

    await runTest();

    document.body.innerHTML = "";
  }

  SimpleTest.finish();
});

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

95%


¤ Dauer der Verarbeitung: 0.24 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 ist noch experimentell.