From 6f7cab91a7f09ca3eee89ea8a426c5bc01733916 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Sat, 2 Apr 2022 00:44:16 +0300 Subject: LibWeb: Use the specification defined types in IntersectionObserverInit --- .../Libraries/LibWeb/IntersectionObserver/IntersectionObserver.h | 4 ++-- .../LibWeb/IntersectionObserver/IntersectionObserver.idl | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'Userland/Libraries/LibWeb') 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; }; -- cgit v1.2.3