directive
Commons
stable
Click-outside handler invoked on each document click event. Calls the bound handler when the last mousedown was outside the element and the binding passes the active check. Internal helper for v-click-outside.
API
Signature
Full TypeScript signature sourced from the util file.
This is a low-level internal helper. Prefer the v-click-outside directive in application code.
API
Parameters
Input parameters accepted by this util.
- erequiredMouseEvent
- The click MouseEvent fired on the document.
- elrequiredHTMLElement
- The element the directive is bound to.
- bindingrequiredIClickOutsideDirectiveBinding
- The Vue directive binding. Its value is either the handler function or an object { handler, closeConditional }.
API
Return value
The value returned by this util.
- Returns nothing. Invokes the bound handler as a side-effect when the outside-click condition is met.
Usage
Examples
Ready-to-paste usage snippets.
Used internally by v-click-outside