File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
packages/npm-packages/ruby-wasm-wasi/example Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
< html >
2
- < script src ="../ dist/browser.script.js "> </ script >
2
+ < script src ="
https://cdn.jsdelivr.net/npm/[email protected] / dist/browser.script.iife .js"
> </ script >
3
3
< script type ="text/ruby ">
4
4
puts "Hello, world!"
5
5
</ script >
Original file line number Diff line number Diff line change 1
1
< html >
2
- < script src ="../../ ruby-head-wasm-wasi/dist/browser.script.iife.js "> </ script >
2
+ < script src ="https://cdn.jsdelivr.net/npm/ ruby-head-wasm-wasi@0.3.0-2022-09-06-f /dist/browser.script.iife.js "> </ script >
3
3
< button id ="draw "> Draw Omikuji</ button >
4
+ < div id ="result "> </ div >
4
5
< script type ="text/ruby ">
5
6
require "js"
6
- luckiness = [ "Lucky" , "Unlucky" ] . sample
7
7
document = JS . global [ :document ]
8
- JS . global [ :document ] . write luckiness
9
8
button = document . getElementById "draw"
10
9
result = document . getElementById "result"
11
10
button . addEventListener "click" do | e |
12
- puts e
11
+ p e
13
12
luckiness = [ "Lucky" , "Unlucky" ] . sample
14
13
result [ :innerText ] = luckiness
15
14
end
You can’t perform that action at this time.
0 commit comments