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_test/Bonsai_web_test/Experimental/Result_spec/index.html

Module Experimental.Result_specSource

Sourcemodule type S = sig ... end
Sourcetype ('result, 'incoming) t = (module S with type incoming = 'incoming and type t = 'result)
Sourceval vdom : ?filter_printed_attributes:(key:string -> data:string -> bool) -> ?censor_paths:bool -> ?censor_hash:bool -> ?path_censoring_message:string -> ?hash_censoring_message:string -> ?to_string:(Bonsai_web.Vdom.Node.t -> string) -> unit -> (Bonsai_web.Vdom.Node.t, Core.Nothing.t) t

filter_printed_attributes controls which attributes on a Node will get printed analyzing the string name of the attribute. Style properties correspond to their property name prefixed with "style.". For example, to filter out the "display" CSS property, you should return false for "style.display"; to filter out all CSS styles, return false when the string begins with "style.". A Node's key corresponds to the string "@key".

In the snippet:

```html <div key1="data1" key2="data2"></div> ```

"key"'s are the left hand side of the equal and "data"'s are the right hand side of the equal sign. This is different from the naming convention mentioned in mdn's https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes name's and value's.

┌───────┬────────┐ │ mdn │ bonsai │ ├───────┼────────┤ │ name │ key │ │ value │ data │ └───────┴────────┘

Sourceval sexp : (module Sexpable with type t = 'a) -> ('a, Core.Nothing.t) t
Sourceval string : (module Stringable with type t = 'a) -> ('a, Core.Nothing.t) t