Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/usehooks-ts.ts>useClickAnyWhere

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function useClickAnyWhere
import { useClickAnyWhere } from "https://deno.land/x/netzo@0.4.72/deps/usehooks-ts.ts";

Custom hook for handling click events anywhere on the document.

Examples

// Usage of useClickAnywhere hook const handleClick = (event) => { console.log('Document clicked!', event); };

// Attach click event handler to document useClickAnywhere(handleClick);

Parameters

handler: (event: MouseEvent) => void
  • The function to be called when a click event is detected anywhere on the document.