File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const css = @import("css.zig");
32
32
const Element = @import ("element.zig" ).Element ;
33
33
const ElementUnion = @import ("element.zig" ).Union ;
34
34
const TreeWalker = @import ("tree_walker.zig" ).TreeWalker ;
35
+ const CSSStyleSheet = @import ("../cssom/css_stylesheet.zig" ).CSSStyleSheet ;
35
36
const Range = @import ("range.zig" ).Range ;
36
37
37
38
const Env = @import ("../env.zig" ).Env ;
@@ -295,6 +296,11 @@ pub const Document = struct {
295
296
pub fn _createRange (_ : * parser.Document , page : * Page ) Range {
296
297
return Range .constructor (page );
297
298
}
299
+
300
+ // TODO: dummy implementation
301
+ pub fn get_styleSheets (_ : * parser.Document ) []CSSStyleSheet {
302
+ return &.{};
303
+ }
298
304
};
299
305
300
306
const testing = @import ("../../testing.zig" );
@@ -471,6 +477,10 @@ test "Browser.DOM.Document" {
471
477
.{ "document.activeElement === document.getElementById('link')" , "true" },
472
478
}, .{});
473
479
480
+ try runner .testCases (&.{
481
+ .{ "document.styleSheets.length" , "0" },
482
+ }, .{});
483
+
474
484
// this test breaks the doc structure, keep it at the end of the test
475
485
// suite.
476
486
try runner .testCases (&.{
You can’t perform that action at this time.
0 commit comments