mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
add dummy document.get_styleSheets
This commit is contained in:
@@ -32,6 +32,7 @@ const css = @import("css.zig");
|
|||||||
const Element = @import("element.zig").Element;
|
const Element = @import("element.zig").Element;
|
||||||
const ElementUnion = @import("element.zig").Union;
|
const ElementUnion = @import("element.zig").Union;
|
||||||
const TreeWalker = @import("tree_walker.zig").TreeWalker;
|
const TreeWalker = @import("tree_walker.zig").TreeWalker;
|
||||||
|
const CSSStyleSheet = @import("../cssom/css_stylesheet.zig").CSSStyleSheet;
|
||||||
const Range = @import("range.zig").Range;
|
const Range = @import("range.zig").Range;
|
||||||
|
|
||||||
const Env = @import("../env.zig").Env;
|
const Env = @import("../env.zig").Env;
|
||||||
@@ -295,6 +296,10 @@ pub const Document = struct {
|
|||||||
pub fn _createRange(_: *parser.Document, page: *Page) Range {
|
pub fn _createRange(_: *parser.Document, page: *Page) Range {
|
||||||
return Range.constructor(page);
|
return Range.constructor(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_styleSheets(_: *parser.Document) []CSSStyleSheet {
|
||||||
|
return &.{};
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const testing = @import("../../testing.zig");
|
const testing = @import("../../testing.zig");
|
||||||
@@ -471,6 +476,10 @@ test "Browser.DOM.Document" {
|
|||||||
.{ "document.activeElement === document.getElementById('link')", "true" },
|
.{ "document.activeElement === document.getElementById('link')", "true" },
|
||||||
}, .{});
|
}, .{});
|
||||||
|
|
||||||
|
try runner.testCases(&.{
|
||||||
|
.{ "document.styleSheets.length", "0" },
|
||||||
|
}, .{});
|
||||||
|
|
||||||
// this test breaks the doc structure, keep it at the end of the test
|
// this test breaks the doc structure, keep it at the end of the test
|
||||||
// suite.
|
// suite.
|
||||||
try runner.testCases(&.{
|
try runner.testCases(&.{
|
||||||
|
|||||||
Reference in New Issue
Block a user