checkEvent

Commons
stable

Determines whether a MouseEvent occurred outside the bound element and its included elements, honouring ShadowRoot boundaries. Used internally by the v-click-outside directive.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

e
required
MouseEvent
The mouse event to evaluate.
el
required
HTMLElement
The root element the directive is bound to.
binding
required
IClickOutsideDirectiveBinding
The directive binding object, which may include a handler callback, a closeConditional guard, and an include list of additional elements.

API

Return value

The value returned by this util.

true when the event is a genuine outside click that should trigger the handler; false otherwise.

Usage

Examples

Ready-to-paste usage snippets.

Used by the v-click-outside directive

typescript