Newer
Older
minerva / Tests / LibWeb / Text / input / css / CSSStyleDeclaration-all-supported-properties-and-default-values.html
@minerva minerva on 13 Jul 745 bytes Initial commit
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
    test(() => {
        const defaultStyleIframe = document.createElement("iframe");
        document.body.appendChild(defaultStyleIframe);

        const defaultStyle = getComputedStyle(defaultStyleIframe.contentDocument.body);

        const stylePrototype = Object.getPrototypeOf(defaultStyle);
        const supportedProperties = Object.getOwnPropertyNames(stylePrototype);

        println("All supported properties and their default values exposed from CSSStyleDeclaration from getComputedStyle:");
        for (const supportedProperty of supportedProperties) {
            println(`'${supportedProperty}': '${defaultStyle[supportedProperty]}'`);
        }
    });
</script>