mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 07:34:18 +00:00
22 lines
792 B
HTML
22 lines
792 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const tests = [
|
|
{ elementName: "hr", attribute: "width", mappedProperty: "width" },
|
|
];
|
|
const values = ["100", " 00110 ", "120."];
|
|
|
|
for (const { elementName, attribute, mappedProperty } of tests) {
|
|
const element = document.createElement(elementName);
|
|
document.body.appendChild(element);
|
|
const style = document.defaultView.getComputedStyle(element);
|
|
for (const value of values) {
|
|
element[attribute] = value;
|
|
println(`Test ${elementName}.${attribute} = "${value}" maps to ${mappedProperty}: ${style[mappedProperty]}`);
|
|
}
|
|
element.remove();
|
|
}
|
|
});
|
|
</script>
|