package incr_dom

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

Dune Dependency

Authors

Maintainers

Sources

incr_dom-v0.15.0.tar.gz
sha256=e79e64efca79b5def4e636b84225710f982bf5f5dda31fcab8e6b4bfab583d10

doc/incr_dom.vdom_file_download/Vdom_file_download/index.html

Module Vdom_file_download

A utility for causing the browser to download a file with the contents taken from a string.

type t
val sexp_of_t : t -> Sexplib0.Sexp.t
val create : filename:string -> mimetype:string -> contents:string -> t
val trigger : t -> unit

Immediately cause the browse to trigger a download for t. You can use this to build a more complex UI for downloads than is offered by Button.create -- e.g. a button that calls an RPC and downloads a file based on the result.

In tests, this just prints a message rather than triggering the download.

module Button : sig ... end
OCaml

Innovation. Community. Security.