mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Add initial implementation of IntersectionObserver
The main missing features are rootMargin, proper nested browsing context support and content clip/clip-path support. This makes images appear on some sites, such as YouTube and howstuffworks.com.
This commit is contained in:
committed by
Andreas Kling
parent
6f8afd8cd9
commit
165abafb80
Notes:
sideshowbarker
2024-07-17 03:16:02 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/165abafb80 Pull-request: https://github.com/SerenityOS/serenity/pull/19860
@@ -0,0 +1,26 @@
|
||||
#import <DOM/Element.idl>
|
||||
#import <Geometry/DOMRect.idl>
|
||||
#import <HighResolutionTime/DOMHighResTimeStamp.idl>
|
||||
|
||||
// https://www.w3.org/TR/intersection-observer/#intersectionobserverentry
|
||||
[Exposed=Window]
|
||||
interface IntersectionObserverEntry {
|
||||
// FIXME: constructor(IntersectionObserverEntryInit intersectionObserverEntryInit);
|
||||
readonly attribute DOMHighResTimeStamp time;
|
||||
readonly attribute DOMRectReadOnly? rootBounds;
|
||||
readonly attribute DOMRectReadOnly boundingClientRect;
|
||||
readonly attribute DOMRectReadOnly intersectionRect;
|
||||
readonly attribute boolean isIntersecting;
|
||||
readonly attribute double intersectionRatio;
|
||||
readonly attribute Element target;
|
||||
};
|
||||
|
||||
dictionary IntersectionObserverEntryInit {
|
||||
required DOMHighResTimeStamp time;
|
||||
required DOMRectInit? rootBounds;
|
||||
required DOMRectInit boundingClientRect;
|
||||
required DOMRectInit intersectionRect;
|
||||
required boolean isIntersecting;
|
||||
required double intersectionRatio;
|
||||
required Element target;
|
||||
};
|
||||
Reference in New Issue
Block a user