diff --git a/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.h b/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.h index 0edc146398..9039205418 100644 --- a/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.h +++ b/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.h @@ -13,9 +13,9 @@ namespace Web::IntersectionObserver { struct IntersectionObserverInit { - DOM::Node* root { nullptr }; + Optional, NonnullRefPtr>> root; String root_margin { "0px"sv }; - JS::Value threshold { 0 }; + Variant> threshold { 0 }; }; // https://w3c.github.io/IntersectionObserver/#intersection-observer-interface diff --git a/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.idl b/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.idl index 1cc24b6a93..122859d825 100644 --- a/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.idl +++ b/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.idl @@ -1,3 +1,4 @@ +#import #import #import @@ -16,11 +17,7 @@ interface IntersectionObserver { }; dictionary IntersectionObserverInit { - // FIXME: Should be: (Element or Document)? - Node? root = null; - + (Element or Document)? root = null; DOMString rootMargin = "0px"; - - // FIXME: Should be: (double or sequence) - any threshold = 0; + (double or sequence) threshold = 0; };