-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Having a public send leads to the annoyance of anything that can watch an event can send data.
The way to get around this is to only give access to the send function to the creater of the event.
A way to do so API wise is to change event
function event(callback) {
var ev = new Event()
callback(function (data) {
send(ev, data)
})
return ev
}
event(function (next) {
elem.addEventListener("click", next)
})
Metadata
Metadata
Assignees
Labels
No labels