allow dom level 1 events to be removed #1385

This commit is contained in:
Leo Horie 2016-11-04 12:33:36 -04:00
parent bc0a75a6a2
commit ff7ce37476
3 changed files with 5 additions and 1 deletions

View file

@ -500,7 +500,7 @@ module.exports = function($window) {
if (typeof onevent === "function") onevent.call(element, e)
return result
}
if (key in element) element[key] = callback
if (key in element) element[key] = typeof value === "function" ? callback : null
else {
var eventName = key.slice(2)
if (vnode.events === undefined) vnode.events = {}