igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
32 lines (31 loc) • 1.22 kB
TypeScript
import { type LitElement, type ReactiveController } from 'lit';
/**
* Reactive controller that allows a host component to resolve ID references
* scoped to its root node, and react to changes in those references.
*/
declare class IdRefResolverController implements ReactiveController {
private readonly _host;
private readonly _callback;
private _active;
private _connected;
private _emitter;
constructor(host: LitElement, callback: (ids: Set<string>) => unknown);
private _observe;
private _unobserve;
/** @internal */
handleEvent(event: Event): void;
/** @internal */
hostConnected(): void;
/** @internal */
hostDisconnected(): void;
/** Start tracking ID reference changes in the document. */
observe(): void;
/** Stop tracking ID reference changes in the document. */
unobserve(): void;
}
/**
* Adds an ID reference resolver controller to the host component, allowing it to resolve ID references scoped to
* its root node and react to changes in those references.
*/
export declare function addIdRefResolver(host: LitElement, callback: (ids: Set<string>) => unknown): IdRefResolverController;
export type { IdRefResolverController };