UNPKG

agnosticrun

Version:

AgnosticRun is a lightweight vanilla JavaScript utility to ensure DOM elements exist before running functions.

2 lines (1 loc) 185 B
export function agnosticRun(options?: { debugLog?: boolean; debugWarn?: boolean }): (fn: (element: HTMLElement, ...args: any[]) => any) => (elementId: string, ...args: any[]) => void;