mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00: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:
parent
6f8afd8cd9
commit
165abafb80
16 changed files with 664 additions and 22 deletions
|
@ -1,19 +1,21 @@
|
|||
#import <DOM/Document.idl>
|
||||
#import <DOM/Element.idl>
|
||||
#import <DOM/Node.idl>
|
||||
#import <IntersectionObserver/IntersectionObserverEntry.idl>
|
||||
|
||||
callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
|
||||
|
||||
[Exposed=(Window)]
|
||||
[Exposed=(Window), UseNewAKString]
|
||||
interface IntersectionObserver {
|
||||
constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {});
|
||||
|
||||
readonly attribute (Element or Document)? root;
|
||||
// FIXME: readonly attribute DOMString rootMargin;
|
||||
// FIXME: `sequence<double>` should be `FrozenArray<double>`
|
||||
readonly attribute sequence<double> thresholds;
|
||||
undefined observe(Element target);
|
||||
undefined unobserve(Element target);
|
||||
undefined disconnect();
|
||||
|
||||
// FIXME:
|
||||
// sequence<IntersectionObserverEntry> takeRecords();
|
||||
sequence<IntersectionObserverEntry> takeRecords();
|
||||
};
|
||||
|
||||
dictionary IntersectionObserverInit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue