Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/css/cssom/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 3 kB image not shown  

Quelle  MediaList.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/css/cssom/MediaList.html


<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>CSSOM - MediaList interface</title>
    <link rel="help" href="https://drafts.csswg.org/cssom/#the-medialist-interface">
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <style>
        @media screen and (min-width: 480px), print, projection {}
    </style>

    <script>
    test(function () {
        var media = document.styleSheets[0].cssRules[0].media;
        assert_equals(media.length, 3"MediaList length attribute");
        assert_equals(media.mediaText, "screen and (min-width: 480px), print, projection""MediaList mediaText attribute");
        assert_equals(media.toString(), "screen and (min-width: 480px), print, projection""MediaList toString method");
        assert_equals(media[0], "screen and (min-width: 480px)""MediaList indexed getter");
        assert_equals(media[1], "print""MediaList indexed getter");
        assert_equals(media[2], "projection""MediaList indexed getter");
        assert_equals(media[3], undefined, "MediaList indexed getter with out of range");
        assert_equals(media.item(0), "screen and (min-width: 480px)""MediaList item method");
        assert_equals(media.item(3), null, "MediaList item method");

        media.deleteMedium("print");
        assert_equals(media.length, 2"MediaList length attribute after delete method");
        assert_equals(media.mediaText, "screen and (min-width: 480px), projection""MediaList mediaText attribute after delete method");
        assert_equals(media.toString(), "screen and (min-width: 480px), projection""MediaList toString method after delete method");
        assert_equals(media[1], "projection""MediaList indexed getter after delete method");
        assert_equals(media[2], undefined, "MediaList indexed getter with out of range after delete method");
        assert_equals(media.item(1), "projection""MediaList indexed getter after delete method");
        assert_equals(media.item(2), null, "MediaList item method after delete method");

        media.appendMedium("speech");
        assert_equals(media.length, 3"MediaList length attribute after append method");
        assert_equals(media.mediaText, "screen and (min-width: 480px), projection, speech""MediaList mediaText attribute after append method");
        assert_equals(media.toString(), "screen and (min-width: 480px), projection, speech""MediaList toString method after append method");
        assert_equals(media[1], "projection""MediaList indexed getter after append method");
        assert_equals(media[2], "speech""MediaList indexed getter after append method");
        assert_equals(media[3], undefined, "MediaList indexed getter with out of range after append method");
        assert_equals(media.item(2), "speech""MediaList item method after append method");
        assert_equals(media.item(3), null, "MediaList item method after append method");

        media.mediaText = null;
        assert_equals(media.mediaText, """MediaList mediaText attribute should be empty string in case of null");
        assert_equals(media.toString(), """MediaList toString method should be empty string in case of null");

        var rule = document.styleSheets[0].cssRules[0];
        rule.media = "speech";
        assert_equals(rule.media.mediaText, "speech""MediaList mediaText attribute should be updated");
    });
    </script>
</head>
</html>

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

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-06-05) ¤

*© 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.