Eine aufbereitete Darstellung der Quelle

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

Benutzer

SSL test_bug311681.html

  Interaktion und
PortierbarkeitHTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/html/test/test_bug311681.html


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=311681
-->

<head>
  <title>Test for Bug 311681</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>        
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=311681">Mozilla Bug 311681</a>
<script class="testbody" type="text/javascript">
  // Setup script
  SimpleTest.waitForExplicitFinish();

  // Make sure to trigger the hashtable case by asking for enough elements
  // by ID.
  for (var i = 0; i < 256; ++i) {
    var x = document.getElementById(i);
  }

  // save off the document.getElementById function, since getting it as a
  // property off the document it causes a content flush.      
  var fun = document.getElementById;

  // Slot for our initial element with id "content"
  var testNode;

  function getCont() {
    return fun.call(document, "content");
  }
  
  function testClone() {
    // Test to make sure that if we have multiple nodes with the same ID in
    // a document we don't forget about one of them when the other is
    // removed.
    var newParent = $("display");
    var node = testNode.cloneNode(true);
    isnot(node, testNode, "Clone should be a different node");

    newParent.appendChild(node);

    // Check what getElementById returns, no flushing
    is(getCont(), node, "Should be getting new node pre-flush 1");
    
    // Trigger a layout flush, just in case.
    var itemHeight = newParent.offsetHeight/10;

    // Check what getElementById returns now.
    is(getCont(), node, "Should be getting new node post-flush 1");
    
    clear(newParent);
    
    // Check what getElementById returns, no flushing
    is(getCont(), testNode, "Should be getting orig node pre-flush 2");
    
    // Trigger a layout flush, just in case.
    var itemHeight = newParent.offsetHeight/10;

    // Check what getElementById returns now.
    is(getCont(), testNode, "Should be getting orig node post-flush 2");

    node = testNode.cloneNode(true);
    newParent.appendChild(node);
    testNode.remove();

    // Check what getElementById returns, no flushing
    is(getCont(), node, "Should be getting clone pre-flush");
    
    // Trigger a layout flush, just in case.
    var itemHeight = newParent.offsetHeight/10;

    // Check what getElementById returns now.
    is(getCont(), node, "Should be getting clone post-flush");

  }

  function clear(node) {
    while (node.hasChildNodes()) {
      node.firstChild.remove();
    }
  }

  addLoadEvent(testClone);
  addLoadEvent(SimpleTest.finish);
</script>
<p id="display"></p>
<div id="content" style="display: none">
  <script class="testbody" type="text/javascript">
    testNode = fun.call(document, "content");
    isnot(testNode, null, "Should have node here");
  </script>
</div>
<pre id="test">
</pre>
</body>
</html>


Messung V0.5 in Prozent
C=91 H=87 G=88

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

*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

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik