package bonsai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val on_effect : ?name_for_testing:string -> unit -> (Virtual_dom.Vdom.Attr.t * unit Effect.t) Bonsai.For_open.Computation.t

focus_handle returns a Vdom.Attr.t and a unit Effect.t that focuses the Vdom.Node.t containing the Vdom.Attr.t. The attr should not be used on more than one Vdom.Node.t, as only the first element will be focused when the effect runs.

val on_activate : ?name_for_testing:string -> unit -> Virtual_dom.Vdom.Attr.t Bonsai.For_open.Computation.t

on_activate will focus the element that the returned attr is attached to when this computation is activated. See Bonsai.Edge for more details on the component lifecycle.

OCaml

Innovation. Community. Security.