UNPKG

@ezbot-ai/javascript-sdk

Version:

The easiest way to interact with ezbot via JS (node and browser)

17 lines (16 loc) 925 B
/** * Checks if a link is a cross-domain link that should be tracked. * * @param linkElement - The anchor element to check * @param allowedDomains - List of allowed domains for cross-domain tracking * @returns boolean indicating if this is a cross-domain link to an allowed domain */ export declare function isCrossDomainLink(linkElement: Readonly<HTMLAnchorElement | HTMLAreaElement>, allowedDomains: readonly string[]): boolean; /** * Creates a cross-domain link checker function that only requires the linkElement parameter. * The allowed domains are captured in the closure. * * @param allowedDomains - List of allowed domains for cross-domain tracking * @returns A function that takes only a linkElement and checks if it's a cross-domain link */ export declare function createCrossDomainLinkChecker(allowedDomains: readonly string[]): (linkElement: Readonly<HTMLAnchorElement | HTMLAreaElement>) => boolean;