mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 08:18:59 +00:00
HTMLDocument: add currentScript getter
This commit is contained in:
@@ -130,6 +130,10 @@ pub const HTMLDocument = struct {
|
|||||||
return try collection.HTMLCollectionByLinks(try rootNode(self), false);
|
return try collection.HTMLCollectionByLinks(try rootNode(self), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_currentScript(_: *parser.DocumentHTML) !?*parser.Element {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
pub fn deinit(_: *parser.DocumentHTML, _: std.mem.Allocator) void {}
|
pub fn deinit(_: *parser.DocumentHTML, _: std.mem.Allocator) void {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -160,6 +164,7 @@ pub fn testExecFn(
|
|||||||
.{ .src = "document.scripts.length", .ex = "0" },
|
.{ .src = "document.scripts.length", .ex = "0" },
|
||||||
.{ .src = "document.forms.length", .ex = "0" },
|
.{ .src = "document.forms.length", .ex = "0" },
|
||||||
.{ .src = "document.links.length", .ex = "1" },
|
.{ .src = "document.links.length", .ex = "1" },
|
||||||
|
.{ .src = "document.currentScript", .ex = "null" },
|
||||||
};
|
};
|
||||||
try checkCases(js_env, &getters);
|
try checkCases(js_env, &getters);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user