package bonsai

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=c78c4476ee6b856846e2d0941e5965009d5e1b853e564b2b1bee61202f0b1ebb

doc/bonsai.web_ui_nav_link/Bonsai_web_ui_nav_link/index.html

Module Bonsai_web_ui_nav_linkSource

Sourceval make' : ?attrs:Bonsai_web.Vdom.Attr.t list -> set_url:('a -> unit Bonsai_web.Effect.t) -> page_to_string:('a -> string) -> 'a -> Bonsai_web.Vdom.Node.t list -> Bonsai_web.Vdom.Node.t

make' is like make, but supports wrapping arbitrary nodes inside the link.

Sourceval make : ?attrs:Bonsai_web.Vdom.Attr.t list -> set_url:('a -> unit Bonsai_web.Effect.t) -> page_to_string:('a -> string) -> 'a -> string -> Bonsai_web.Vdom.Node.t

make builds a nav link, a link to navigates to another page within the app. It performs an on-page navigation when clicked directly, but also plays well with Mod-click, such as Ctrl-click to open in a new tab.

When using this inside your app, you may want to create a wrapper that fixes the page_to_string argument.