The function to call when the target is resized.
Optionaloptions: {Optional configuration:
element: Target to observe (window, document, or an HTMLElement). Defaults to window.delay: Debounce delay in milliseconds (only applies to window/document). Defaults to 50.A cleanup function to remove the listener or disconnect the observer.
Registers a resize callback that works for either the
window,document, or a specificHTMLElement.Internally uses
ResizeObserverfor elements, and a debouncedresizeevent for the window or document.