Created
November 18, 2019 20:10
-
-
Save CarlMungazi/0f37b55017a6fcdc343cecf92b01867d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function updateEvent(vnode, key, value) { | |
if (vnode.events != null) { | |
if (vnode.events[key] === value) return | |
if (value != null && (typeof value === "function" || typeof value === "object")) { | |
if (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false) | |
vnode.events[key] = value | |
} | |
// ... | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment