@nuxt/scripts
Version:
Load third-party scripts with better performance, privacy and DX in Nuxt Apps.
16 lines (15 loc) • 483 B
TypeScript
export interface InteractionScriptTriggerOptions {
/**
* The interaction events to listen for.
*/
events: string[];
/**
* The element to listen for events on.
* @default document.documentElement
*/
target?: EventTarget | null;
}
/**
* Create a trigger that loads a script when any of the specified interaction events occur.
*/
export declare function useScriptTriggerInteraction(options: InteractionScriptTriggerOptions): Promise<boolean>;