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

Quelle  test_click_on_restyled_element.html   Sprache: HTML

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


<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <title>Test for clicking on an element which is restyled/reframed by mousedown event</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script src="/tests/SimpleTest/EventUtils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  <style>
    .before-pseudo-element *:active::before {
      content: "";
      display: block;
      height: 2px;
      position: absolute;
      top: -2px;
      left: 0;
      width: 100%;
    }
    .position-relative *:active {
      position: relative;
      top: 1px;
    }
  </style>
</head>
<body>
<section class="before-pseudo-element"><a href="about:blank">link</a></section><!-- bug 1398196 -->
<section class="before-pseudo-element"><span>span</span></section>
<section class="position-relative"><a href="about:blank">link</a></section><!-- bug 1506508 -->
<section class="position-relative"><span>span</span></section>
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(function doTest() {
  for (let sectionId of ["before-pseudo-element""position-relative"]) {
    for (let element of ["a""span"]) {
      let target = document.querySelector(`section.${sectionId} ${element}`);
      target.scrollIntoView(true);
      let clicked = false;
      target.addEventListener("click", (aEvent) => {
        is(aEvent.target, target, `click event is fired on the <${element}> element in ${sectionId} section as expected`);
        aEvent.preventDefault();
        clicked = true;
      }, {once: true});
      synthesizeMouseAtCenter(target, {});
      ok(clicked, `Click event should've been fired on the <${element}> element in ${sectionId} section`);
    }
  }
  SimpleTest.finish();
});
</script>
</body>
</html>

Messung V0.5
C=96 H=92 G=93

¤ Dauer der Verarbeitung: 0.14 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.