mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 22:43:48 +00:00
load event dispatching for Style
This commit is contained in:
@@ -96,6 +96,15 @@ pub const JsApi = struct {
|
||||
pub const sheet = bridge.accessor(Style.getSheet, null, .{});
|
||||
};
|
||||
|
||||
pub const Build = struct {
|
||||
pub fn created(node: *Node, page: *Page) !void {
|
||||
const self = node.as(Style);
|
||||
const style = self.asElement();
|
||||
// Push to `_to_load` to dispatch load event just before window load event.
|
||||
return page._to_load.append(page.arena, style);
|
||||
}
|
||||
};
|
||||
|
||||
const testing = @import("../../../../testing.zig");
|
||||
test "WebApi: Style" {
|
||||
try testing.htmlRunner("element/html/style.html", .{});
|
||||
|
||||
Reference in New Issue
Block a user