ladybird/Tests/LibWeb/Text/input/css/CSSStyleProperties-all-supported-properties-and-default-values.html

19 lines
744 B
HTML
Raw Normal View History

<!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 CSSStyleProperties from getComputedStyle:");
for (const supportedProperty of supportedProperties) {
println(`'${supportedProperty}': '${defaultStyle[supportedProperty]}'`);
}
});
</script>