package bonsai
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
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_scroll_utilities/Bonsai_web_ui_scroll_utilities/index.html
Module Bonsai_web_ui_scroll_utilitiesSource
Source
val to_position_inside_element :
?smooth:bool ->
selector:string ->
x_px:float ->
y_px:float ->
[ `Minimal | `To_bottom | `To_top ] ->
unit Core.Or_error.t Bonsai_web.Effect.tScrolls to a position inside an element found by the provided selector. The target element must be relatively or absolutely positioned.
Returns a unit Or_error.t Effect.t that will be an error if the element picked by "selector" can't be found.
`Minimal, `To_bottom, and `To_top are used to determine where the chosen pixel would end up inside the scrolling container after the scrolling is finished.
Source
val into_view :
?smooth:bool ->
selector:string ->
[ `Minimal | `To_top | `To_bottom ] ->
unit Core.Or_error.t Bonsai_web.Effect.tSimilar to the above function, but instead of scrolling to a position, it scrolls to a specific element
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>