Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window: implement a debug() function #315

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/html/window.zig
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const EventTarget = @import("../dom/event_target.zig").EventTarget;

const storage = @import("../storage/storage.zig");

const log = std.log.scoped(.window);

// https://dom.spec.whatwg.org/#interface-window-extensions
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#window
pub const Window = struct {
Expand Down Expand Up @@ -66,6 +68,10 @@ pub const Window = struct {
return self;
}

pub fn _debug(_: *Window, str: []const u8) void {
log.debug("{s}", .{str});
}

pub fn get_self(self: *Window) *Window {
return self;
}
Expand Down