index.js
function handler(e) {
      if (!vNode.context) return

      // some components may have related popup item, on which we shall prevent the click outside event handler.
      var elements = e.path || (e.composedPath && e.composedPath())
      elements && elements.length > 0 && elements.unshift(e.target)
      
      if (el.contains(e.target) || isPopup(vNode.context.popupItem, elements)) return

      el.__vueClickOutside__.callback(e)
    }
function handler(e) {
      if (!vNode.context) return

      // some components may have related popup item, on which we shall prevent the click outside event handler.
      var elements = e.path || (e.composedPath && e.composedPath())
      elements && elements.length > 0 && elements.unshift(e.target)
      
      if (el.contains(e.target) || isPopup(vNode.context.popupItem, elements)) return

      el.__vueClickOutside__.callback(e)
    }
function handler ( e ) { if ( ! vNode . context ) return // some components may have related popup item, on which we shall prevent the click outside event handler. var elements = e . path || ( e . composedPath && e . composedPath ( ) ) elements && elements . length > 0 && elements . unshift ( e . target ) if ( el . contains ( e . target ) || isPopup ( vNode . context . popupItem , elements ) ) return el . __vueClickOutside__ . callback ( e ) }
Define Handler and cache it on the element
Define Handler and cache it on the element