InBounds

InBounds

new InBounds()

Source:
Properties:
Name Type Description
boundaryLabel string

data field for sentinal elements

boundaryUpperValue string

used to identify the top sentinal element

boundaryLowerValue string

used to identify the bottom sentinal element

boundaryStyle string

style applied to sentinal elements

adminBarSelector string

selector for the wp admin bar (used to calculate topMargin)

navBarSelector string

selector for the nav bar (used to calculate topMargin)

$container element

DOM object representing the container being observed

$upperbound element

DOM object representing the upper sentinal element

$lowerbound element

DOM object representing the lower sentinal element

observer object

the InView object instance we are using to keep watch

settings object

class setting parameters passed to the constructor

name string

name to uniquely identify this object instance

topMargin int

we shrink the viewport by this amount to exclude sticky elements

Detects whether the edge of a container has entered or exited the viewport. This is useful because intersection observer has a hard time observing objects that are larger than the viewport itself. This is done by adding small sentinal objects to the top and bottom of the container that can be observed more easily.

InBounds