Skip to content

ResizeObserverAPI

Types

resizeObserver

type resizeObserver = {}

Module

There are methods and helpers defined in ResizeObserver .

resizeObserverBoxOptions

type resizeObserverBoxOptions =
| @as("border-box") BorderBox
| @as("content-box") ContentBox
| @as("device-pixel-content-box") DevicePixelContentBox

resizeObserverCallback

type resizeObserverCallback = array<
resizeObserverEntry,
> => resizeObserver => unit

resizeObserverEntry

type resizeObserverEntry = {
target: WebAPI.DOMAPI.element,
contentRect: WebAPI.DOMAPI.domRectReadOnly,
borderBoxSize: array<resizeObserverSize>,
contentBoxSize: array<resizeObserverSize>,
devicePixelContentBoxSize: array<resizeObserverSize>,
}

Record fields

borderBoxSize
contentBoxSize
devicePixelContentBoxSize

resizeObserverOptions

type resizeObserverOptions = {
mutable box?: resizeObserverBoxOptions,
}

Record fields

box

resizeObserverSize

type resizeObserverSize = {
inlineSize: float,
blockSize: float,
}

Record fields

inlineSize
float
blockSize
float