blob: 9e14ff69ce021e94068c9530a90e47e2e93850f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<script src="../include.js"></script>
<script>
test(() => {
function checkColor(color) {
document.body.bgColor = color;
const computedStyle = getComputedStyle(document.body);
const bgcolor = computedStyle.backgroundColor;
println(`'${color}' => ${bgcolor}`);
}
for (color of [
"red",
"#408080",
"transparent",
" GreeN ",
"cafe",
"",
"deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", // longer than 128 chars of hex
"#emoji above U+FFFF 🙃",
]) {
checkColor(color);
}
});
</script>
|