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


Quelle  test_animations_variable_changes.html   Sprache: HTML

 
 products/sources/formale Sprachen/C/Firefox/layout/style/test/test_animations_variable_changes.html


<!DOCTYPE html>
<meta charset=utf-8>
<title>Tests that animations respond to changes to variables</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../testcommon.js"></script>
<style>
:root {
  --width: 100px;
}
.wider {
  --width: 200px;
}
@keyframes widen {
  to { margin-left: var(--width) }
}
</style>
<body>
<div id="log"></div>
<script>

test(() => {
  const div = document.createElement('div');
  document.body.append(div);

  div.style.animation = 'widen step-start 100s';
  assert_equals(getComputedStyle(div).marginLeft, '100px',
                'Animation value before updating CSS variable');

  div.classList.add('wider');

  assert_equals(getComputedStyle(div).marginLeft, '200px',
                'Animation value after updating CSS variable');

  div.remove();
}, 'Animation reflects changes to custom properties');

test(() => {
  const parent = document.createElement('div');
  const child = document.createElement('div');
  parent.append(child);
  document.body.append(parent);

  child.style.animation = 'widen step-start 100s';
  assert_equals(getComputedStyle(child).marginLeft, '100px',
                'Animation value before updating CSS variable');

  parent.classList.add('wider');

  assert_equals(getComputedStyle(child).marginLeft, '200px',
                'Animation value after updating CSS variable');

  parent.remove();
  child.remove();
}, 'Animation reflect changes to custom properties on parent');

</script>
</body>

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

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge