@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="IntersectionObserver")
public class IntersectionObserver
extends java.lang.Object
| Constructor and Description |
|---|
IntersectionObserver(IntersectionObserverCallback callback)
The IntersectionObserver() constructor creates and returns a new IntersectionObserver object.
|
IntersectionObserver(IntersectionObserverCallback callback,
IntersectionObserverInit options)
The IntersectionObserver() constructor creates and returns a new IntersectionObserver object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect()
The IntersectionObserver method disconnect() stops watching all of its target elements for visibility changes.
|
void |
observe(Element target)
The IntersectionObserver method observe() adds an element to the set of target elements being watched by the IntersectionObserver.
|
ElementOrDocumentUnion |
root()
The IntersectionObserver interface's read-only root property identifies the Element or Document whose bounds are treated as the bounding box of the viewport for the element which is the observer's target.
|
java.lang.String |
rootMargin()
The IntersectionObserver interface's read-only rootMargin property is a string with syntax similar to that of the CSS margin property.
|
JsArray<IntersectionObserverEntry> |
takeRecords()
The IntersectionObserver method takeRecords() returns an array of IntersectionObserverEntry objects, one for each targeted element which has experienced an intersection change since the last time the intersections were checked, either explicitly through a call to this method or implicitly by an automatic call to the observer's callback.
|
JsArray<java.lang.Double> |
thresholds()
The IntersectionObserver interface's read-only thresholds property returns the list of intersection thresholds that was specified when the observer was instantiated with IntersectionObserver().
|
void |
unobserve(Element target)
The IntersectionObserver method unobserve() instructs the IntersectionObserver to stop observing the specified target element.
|
public IntersectionObserver(@Nonnull
IntersectionObserverCallback callback,
@Nonnull
IntersectionObserverInit options)
public IntersectionObserver(@Nonnull
IntersectionObserverCallback callback)
@JsProperty(name="root") @Nullable public ElementOrDocumentUnion root()
@JsProperty(name="rootMargin") @Nonnull public java.lang.String rootMargin()
@JsProperty(name="thresholds") @Nonnull public JsArray<java.lang.Double> thresholds()
public void disconnect()
public void observe(@Nonnull
Element target)
@Nonnull public JsArray<IntersectionObserverEntry> takeRecords()
public void unobserve(@Nonnull
Element target)