ResizeObserver

A performant mechanism by which code can monitor an element for changes to its size.

See also

Constructors

Link copied to clipboard
constructor(resized: (List<ResizeObserver.Entry>) -> Unit)
constructor(resized: (List<ResizeObserver.Entry>, ResizeObserver) -> Unit)

Types

Link copied to clipboard
Link copied to clipboard
class Entry(val target: Element, val borderBoxSize: List<ResizeObserver.Size>, val contentBoxSize: List<ResizeObserver.Size>, val contentRect: DOMRectReadOnly, val devicePixelContentBoxSize: List<ResizeObserver.Size>)
Link copied to clipboard
class ObserveOptions(val boxType: ResizeObserver.BoxType? = null)
Link copied to clipboard
class Size(val blockSize: Double, val inlineSize: Double)

Functions

Link copied to clipboard
Link copied to clipboard
fun observe(element: Element)
Link copied to clipboard
fun unobserve(element: Element)