Yes, I realised that after examining a number of script examples. The only question now is how to send graphical contents of the canvas when a button is pressed. I failed at calling the javascript directly - too many type conflicts with the Threepenny library. I would like to send a PNG or JPG bytestream from the html page to Haskell for further processing, instead of uisng the data to open a window in the browser (which is dead standard practise).
– Charles SchatzMar 21 '16 at 03:14