package bonsai
A library for building dynamic webapps, using Js_of_ocaml
Install
Dune Dependency
Authors
Maintainers
Sources
bonsai-v0.16.0.tar.gz
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303
doc/bonsai.web/Bonsai_web/Effect/Focus/index.html
Module Effect.Focus
Source
Source
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.
Source
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.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>