added basic style test to HTMLElement

This commit is contained in:
Raph
2025-05-24 02:20:15 +02:00
parent 5dbdf8321a
commit a2e0fd28e0

View File

@@ -1064,4 +1064,14 @@ test "Browser.HTML.Element" {
.{ "document.getElementById('content').click()", "undefined" },
.{ "click_count", "1" },
}, .{});
try runner.testCases(&.{
.{ "let style = document.getElementById('content').style", "undefined" },
.{ "style.cssText = 'color: red; font-size: 12px; margin: 5px !important;'", "color: red; font-size: 12px; margin: 5px !important;" },
.{ "style.length", "3" },
.{ "style.setProperty('background-color', 'blue')", "undefined" },
.{ "style.getPropertyValue('background-color')", "blue" },
.{ "style.length", "4" },
}, .{});
}