Skip to content

Commit 34ab815

Browse files
committed
add dummy document.get_styleSheets
1 parent fb58c50 commit 34ab815

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/browser/dom/document.zig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const css = @import("css.zig");
3232
const Element = @import("element.zig").Element;
3333
const ElementUnion = @import("element.zig").Union;
3434
const TreeWalker = @import("tree_walker.zig").TreeWalker;
35+
const CSSStyleSheet = @import("../cssom/css_stylesheet.zig").CSSStyleSheet;
3536
const Range = @import("range.zig").Range;
3637

3738
const Env = @import("../env.zig").Env;
@@ -295,6 +296,10 @@ pub const Document = struct {
295296
pub fn _createRange(_: *parser.Document, page: *Page) Range {
296297
return Range.constructor(page);
297298
}
299+
300+
pub fn get_styleSheets(_: *parser.Document) []CSSStyleSheet {
301+
return &.{};
302+
}
298303
};
299304

300305
const testing = @import("../../testing.zig");
@@ -471,6 +476,10 @@ test "Browser.DOM.Document" {
471476
.{ "document.activeElement === document.getElementById('link')", "true" },
472477
}, .{});
473478

479+
try runner.testCases(&.{
480+
.{ "document.styleSheets.length", "0" },
481+
}, .{});
482+
474483
// this test breaks the doc structure, keep it at the end of the test
475484
// suite.
476485
try runner.testCases(&.{

0 commit comments

Comments
 (0)