Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  test_dnd_with_modifiers.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/events/test/test_dnd_with_modifiers.html


<!DOCTYPE html>
<html>
  <meta charset="utf-8">
  <title>Test dragstart, drag, dragover, drop, dragend with keyboard modifiers</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
  <div id="test"></div>
  <script>
  SimpleTest.waitForExplicitFinish();

  SimpleTest.waitForFocus(() => {
    let dragEvents = ["dragstart""drag""dragend"];
    let dropEvents = ["dragover""drop"];
    let source = document.getElementById("source");
    let target = document.getElementById("target");

    dragEvents.forEach((ev, idx, array) => {
      source.addEventListener(ev, (e) => {
        ok(e.ctrlKey, e.type + ".ctrlKey should be true");
        ok(!e.shiftKey, e.type + ".shiftKey should be false");
        ok(e.altKey, e.type + ".altKey should be true");
      }, {once: true});
    });

    dropEvents.forEach((ev, idx, array) => {
      target.addEventListener(ev, (e) => {
        ok(e.ctrlKey, e.type + ".ctrlKey should be true");
        ok(!e.shiftKey, e.type + ".shiftKey should be false");
        ok(e.altKey, e.type + ".altKey should be true");
      }, {once: true});
    });

    source.addEventListener("dragstart", (e) => {
      e.preventDefault();
    }, {once: true});

    source.addEventListener("dragend", (e) => {
      SimpleTest.finish();
    });

    let selection = window.getSelection();
    selection.selectAllChildren(source);

    synthesizeMouse(source11, {type: "mousedown", ctrlKey: true, altKey: true}, window);
    synthesizeMouse(source1010, {type: "mousemove", ctrlKey: true, altKey: true}, window);
    synthesizeMouse(source1010, {type: "mouseup", ctrlKey: true, altKey: true}, window);

    let dragEvent = {
      type: "drag",
      ctrlKey: true,
      altKey: true,
    };
    sendDragEvent(dragEvent, source, window);

    let rect = target.getBoundingClientRect();
    let dropEvent = {
      ctrlKey: true,
      altKey: true,
      clientX: rect.left + rect.width / 2,
      clientY: rect.top + rect.height / 2,
    };
    selection.selectAllChildren(source);
    synthesizeDrop(source, target, [], "copy", window, window, dropEvent);

    let dragEndEvent = {
      type: "dragend",
      ctrlKey: true,
      altKey: true,
    };
    sendDragEvent(dragEndEvent, source, window);
  });
  </script>
<body>
  <span id="source" style="font-size: 40px;">test</span>
  <div id="target" contenteditable="true" width="50" height="50"></div>
</body>
</html>

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

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






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=277311
#Domains=752002