@s4e/jsentinel
Version:
Script integrity and clipboard tamper detection for browsers.
11 lines (10 loc) • 664 B
TypeScript
import type { JSentinelOptions, JSentinelMessage } from "./types";
export declare function onJSentinel<T extends JSentinelMessage["type"]>(type: T, handler: (data: Extract<JSentinelMessage, {
type: T;
}>["data"]) => void): (e: Event) => void;
export declare function onJSentinelAny(handler: (msg: JSentinelMessage) => void): (e: Event) => void;
export declare function offJSentinel(listener: EventListener): void;
/** ---------- init ---------- **/
export declare function initJSentinel(options?: JSentinelOptions): Promise<void>;
/** ---------- optional: console logger helper ---------- **/
export declare function attachConsoleLogger(): (e: Event) => void;