package bonsai

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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