File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ pub const IntersectionObserver = struct {
5151 var options = IntersectionObserverOptions {
5252 .root = parser .documentToNode (parser .documentHTMLToDocument (page .window .document )),
5353 .rootMargin = "0px 0px 0px 0px" ,
54- .threshold = &.{ 0.0 },
54+ .threshold = .{ . single = 0.0 },
5555 };
5656 if (options_ ) | * o | {
5757 if (o .root ) | root | {
@@ -107,7 +107,12 @@ pub const IntersectionObserver = struct {
107107const IntersectionObserverOptions = struct {
108108 root : ? * parser.Node , // Element or Document
109109 rootMargin : ? []const u8 ,
110- threshold : ? []const f32 ,
110+ threshold : ? Threshold ,
111+
112+ const Threshold = union (enum ) {
113+ single : f32 ,
114+ list : []const f32 ,
115+ };
111116};
112117
113118// https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry
You can’t perform that action at this time.
0 commit comments