UNPKG

@legumeinfo/web-components

Version:

Web Components for the Legume Information System and other AgBio databases

39 lines 1.42 kB
import { ReactiveController, ReactiveControllerHost } from 'lit'; /** * The signature of the callback function required when initializing the controller. * * @param entries - An array of entries that can be used to access the new dimensions of * observed elements. */ export type CallbackFunction = (entries: ResizeObserverEntry[]) => void; /** * A controller that wraps the {@link !ResizeObserver | `ResizeObserver`}, allowing * components to subscribe to the events in a manner that triggers changes in the * component's template when the event occurs. */ export declare class LisResizeObserverController implements ReactiveController { /** @ignore */ host: ReactiveControllerHost; /** @ignore */ private _resizeObserver; /** * @param host - The component that's using the controller. * @param callback - A function to call in the host's scope when a resize event occurs. */ constructor(host: ReactiveControllerHost, callback: CallbackFunction); /** @ignore */ hostDisconnected(): void; /** * Observes the given element. * * @param element - The element to be observed. */ observe(element: HTMLElement): void; /** * Stops observing the given element. * * @param element - The element to stop observing. */ unobserve(element: HTMLElement): void; } //# sourceMappingURL=lis-resize-observer-controller.d.ts.map