Uses ResizeObserver to observe changes to elements passed to the signal.
Param: source
Either a signal/observable/function that returns Elements or ElementRefs, or a value that is Element or ElementRef.
If the source is a value then the signal will be writable.
Param: options
Options for the signal or the ResizeObserver used to monitor changes.
Example
constel = document.getElementById('el1'); const$obs = resizeSignal(el); effect(() =>console.log($obs()[0])); // will output changes to size. el.style.height = '250px';
Uses ResizeObserver to observe changes to elements passed to the signal.
Param: source
Either a signal/observable/function that returns Elements or ElementRefs, or a value that is Element or ElementRef. If the source is a value then the signal will be writable.
Param: options
Options for the signal or the ResizeObserver used to monitor changes.
Example