mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
Add setImmediate, clearImmediate (#1065)
This commit is contained in:
@@ -253,6 +253,14 @@ pub const Window = struct {
|
||||
return self.createTimeout(cbk, 0, page, .{ .name = "queueMicrotask" });
|
||||
}
|
||||
|
||||
pub fn _setImmediate(self: *Window, cbk: Function, page: *Page) !u32 {
|
||||
return self.createTimeout(cbk, 0, page, .{ .name = "setImmediate" });
|
||||
}
|
||||
|
||||
pub fn _clearImmediate(self: *Window, id: u32) void {
|
||||
_ = self.timers.remove(id);
|
||||
}
|
||||
|
||||
pub fn _matchMedia(_: *const Window, media: Env.String) !MediaQueryList {
|
||||
return .{
|
||||
.matches = false, // TODO?
|
||||
|
||||
Reference in New Issue
Block a user