VueJS Custom Directive Function as Argument
You can use binding.value
which should be a function in this case. It's already prebound to correct context so just call it (pass anything in it if you need something):
Vue.directive('sample', {
bind: function (el, binding, vnode) {
el.addEventListener('click', function () {
binding.value()
});
},
});