1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 13:37:44 +00:00
serenity/Tests/LibWeb/Text/expected/document-adopted-style-sheets.txt
Aliaksandr Kalenik 7c322ec710 LibWeb: Implement adoptedStyleSheets attribute for Document
https://drafts.csswg.org/cssom/#dom-documentorshadowroot-adoptedstylesheets

The attribute implementation for ShadowRoot is currently missing
because we do not yet distinguish between the style sheets of
ShadowRoot and Document, and we need to address the issue first.
2024-03-08 16:31:21 +01:00

11 lines
667 B
Text

color with no adopted style sheets: rgb(0, 0, 0)
document.adoptedStyleSheets.length=(1)
add style sheet using Array.prototype.push(): rgb(255, 0, 0)
document.adoptedStyleSheets.length=(0)
delete added style sheet using Array.prototype.pop(): rgb(0, 0, 0)
document.adoptedStyleSheets.length=(1)
add style by assigning array to document.adoptedStyleSheets: rgb(255, 0, 0)
document.adoptedStyleSheets.length=(1)
add style by assigning Set to document.adoptedStyleSheets: rgb(0, 128, 0)
assignment of non-iterable value to document.adoptedStyleSheets throws "1 is not iterable"
assignment of value that is not CSSStyleSheet throws "Not an object of type CSSStyleSheet"