Open ersimont opened 2 years ago
Add an adapter to get MutationObserver into the rxjs world
MutationObserver
export function getResize$( target: Element, options?: ResizeObserverOptions, ): Observable<ResizeObserverEntry> { return new Observable<ResizeObserverEntry>((subscriber) => { const observer = new ResizeObserver(([entry]) => { subscriber.next(entry); }); observer.observe(target, options); return (): void => { observer.unobserve(target); }; }); }
Add an adapter to get
MutationObserver
into the rxjs world