I'm trying to find the best way to execute some javascript as part of my view function. In the view function I want to create a canvas object and then execute a native function that inserts some data into it based on my model. The parts individually seem easy enough to write, but I'm not sure how to glue them together.
If I simply insert the native call into my view code, presumably it has to produce some HTML (e.g. an empty div) in order to satisfy the type system; perhaps this is the correct thing to do, but it feels a bit hackish. Is there a better, more idiomatic way? Am I even thinking about this in the correct, Elm-ish way?