Skip to content

Commit a2e0fd2

Browse files
committed
added basic style test to HTMLElement
1 parent 5dbdf83 commit a2e0fd2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/browser/html/elements.zig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,4 +1064,14 @@ test "Browser.HTML.Element" {
10641064
.{ "document.getElementById('content').click()", "undefined" },
10651065
.{ "click_count", "1" },
10661066
}, .{});
1067+
1068+
try runner.testCases(&.{
1069+
.{ "let style = document.getElementById('content').style", "undefined" },
1070+
.{ "style.cssText = 'color: red; font-size: 12px; margin: 5px !important;'", "color: red; font-size: 12px; margin: 5px !important;" },
1071+
.{ "style.length", "3" },
1072+
.{ "style.setProperty('background-color', 'blue')", "undefined" },
1073+
.{ "style.getPropertyValue('background-color')", "blue" },
1074+
.{ "style.length", "4" },
1075+
}, .{});
1076+
10671077
}

0 commit comments

Comments
 (0)