_hyperscript
_hyperscript copied to clipboard
Calling functions from eventsource
Functions and events defined in a _= block using eventsource does not have access to "me" and the locally defined functions and variables.
<div _="
def thing()
log 1
end
eventsource Stream from /stream
on message
log it
call thing()
end
end
"></div>