Skip to content

Intersection observer api #584

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions src/browser/env.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ const Interfaces = generate.Tuple(.{
@import("url/url.zig").Interfaces,
@import("xhr/xhr.zig").Interfaces,
@import("xmlserializer/xmlserializer.zig").Interfaces,
CSSStyleDeclaration,
});

pub const CSSStyleDeclaration = struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe moved to the css folder?

Copy link
Contributor Author

@sjorsdonkers sjorsdonkers Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're too fast lol, I'm closing this PR

pub fn get_display(_: *CSSStyleDeclaration) []const u8 {
return "anythingbutnotnone";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unset is probably better (it has a real meaning here)

}
};

pub const JsThis = Env.JsThis;
pub const JsObject = Env.JsObject;
pub const Callback = Env.Callback;
Expand Down
5 changes: 5 additions & 0 deletions src/browser/html/window.zig
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ pub const Window = struct {
return &self.storage_shelf.?.bucket.session;
}

const Env = @import("../env.zig");
pub fn _getComputedStyle(_: *Window, _: *parser.Element) Env.CSSStyleDeclaration {
return .{};
}

// TODO handle callback arguments.
pub fn _setTimeout(self: *Window, cbk: Callback, delay: ?u32, state: *SessionState) !u32 {
if (self.timeoutid >= self.timeoutids.len) return error.TooMuchTimeout;
Expand Down
Loading
Loading