Explorar o código

return event handler return value

Evan You %!s(int64=12) %!d(string=hai) anos
pai
achega
52c535be89
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/directives/on.js

+ 2 - 1
src/directives/on.js

@@ -21,8 +21,9 @@ module.exports = {
         this.handler = function (e) {
         this.handler = function (e) {
             e.targetVM = vm
             e.targetVM = vm
             context.$event = e
             context.$event = e
-            handler.call(context, e)
+            var res = handler.call(context, e)
             context.$event = null
             context.$event = null
+            return res
         }
         }
         this.el.addEventListener(this.arg, this.handler)
         this.el.addEventListener(this.arg, this.handler)
     },
     },