OvermindDL1 / bucklescript-tea

TEA for Bucklescript
Other
602 stars 45 forks source link

File module? #136

Open chadselph opened 4 years ago

chadselph commented 4 years ago

It seems like there's no port of Elm's File module. I tried to get around this with

          input'(
            [type'("file"), onChange(s => GotFile(s))],
            [text("ok")],
          )

but the callback just uses .value which is just a string of a (fake) file path. I'm sure I could use on("change"... but I couldn't figure out how to write the JSON decode I needed to get the event into a javascript File.