Bootstrap

API resizeObserver

createResizeObserver

function

createResizeObserver(): object

Create a resize observer object

Returns

object

An object containing the store with the dimentions of observed element (ResizeObserverEntry), the directive to be applied to the html element to be observed

dimensions$

dimensions$: ReadableSignal<undefined | ResizeObserverEntry> = observedElement$

Store which contains the dimensions of the observed element (ResizeObserverEntry type) See the MDN documentation

directive

directive: Directive<void, SSRHTMLElement>

Directive to be attached to html element in order to listen to resize events