I’m writing a book about Elm for React developers. In the JavaScript interop chapter, I needed a simple example of calling a browser API from Elm through a port.

I’m writing a book about Elm for React developers. In the JavaScript interop chapter, I needed a simple example of calling a browser API from Elm through a port.