mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb: Make CSSStyleDeclaration a legacy platform object with indices
CSSStyleDeclaration has an indexed property getter, which returns properties associated with the object in the order they were specified in.
This commit is contained in:
parent
aacf9b08ed
commit
a94282e0e8
Notes:
github-actions[bot]
2024-11-14 18:51:15 +00:00
Author: https://github.com/Lubrsi
Commit: a94282e0e8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2346
3 changed files with 247 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const bodyStyleDeclaration = getComputedStyle(document.body);
|
||||
|
||||
const serializedBodyComputedStyle = JSON.stringify(bodyStyleDeclaration, null, 4);
|
||||
println("All properties associated with getComputedStyle(document.body):");
|
||||
println(serializedBodyComputedStyle);
|
||||
|
||||
const serializedBodyElementStyle = JSON.stringify(document.body.style, null, 4);
|
||||
println("All properties associated with document.body.style by default:");
|
||||
println(serializedBodyElementStyle);
|
||||
|
||||
document.body.style.display = "none";
|
||||
document.body.style.backgroundColor = "red";
|
||||
document.body.style.fontSize = "15px";
|
||||
|
||||
const serializedBodyElementStyleWithSetProperties = JSON.stringify(document.body.style, null, 4);
|
||||
println("All properties associated with document.body.style after setting some properties:");
|
||||
println(serializedBodyElementStyleWithSetProperties);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue