mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:27:34 +00:00
LibWeb: Use the specification defined types in IntersectionObserverInit
This commit is contained in:
parent
b172b56757
commit
6f7cab91a7
2 changed files with 5 additions and 8 deletions
|
@ -13,9 +13,9 @@
|
||||||
namespace Web::IntersectionObserver {
|
namespace Web::IntersectionObserver {
|
||||||
|
|
||||||
struct IntersectionObserverInit {
|
struct IntersectionObserverInit {
|
||||||
DOM::Node* root { nullptr };
|
Optional<Variant<NonnullRefPtr<DOM::Element>, NonnullRefPtr<DOM::Document>>> root;
|
||||||
String root_margin { "0px"sv };
|
String root_margin { "0px"sv };
|
||||||
JS::Value threshold { 0 };
|
Variant<double, Vector<double>> threshold { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
|
// https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#import <DOM/Document.idl>
|
||||||
#import <DOM/Element.idl>
|
#import <DOM/Element.idl>
|
||||||
#import <DOM/Node.idl>
|
#import <DOM/Node.idl>
|
||||||
|
|
||||||
|
@ -16,11 +17,7 @@ interface IntersectionObserver {
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary IntersectionObserverInit {
|
dictionary IntersectionObserverInit {
|
||||||
// FIXME: Should be: (Element or Document)?
|
(Element or Document)? root = null;
|
||||||
Node? root = null;
|
|
||||||
|
|
||||||
DOMString rootMargin = "0px";
|
DOMString rootMargin = "0px";
|
||||||
|
(double or sequence<double>) threshold = 0;
|
||||||
// FIXME: Should be: (double or sequence<double>)
|
|
||||||
any threshold = 0;
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue