mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 18:55:29 -05:00
7 lines
165 B
Ruby
7 lines
165 B
Ruby
def on_message(event)
|
|
puts event[:data]
|
|
$xworker.call('postMessage', 'Ruby: Hello MicroPython 👋')
|
|
end
|
|
|
|
$xworker[:onmessage] = -> (event) { on_message event }
|