package bonsai

  1. Overview
  2. Docs
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_ui_scroll_utilities/Bonsai_web_ui_scroll_utilities/index.html

Module Bonsai_web_ui_scroll_utilitiesSource

Sourceval to_position_inside_element : ?smooth:bool -> selector:string -> x_px:int -> y_px:int -> [ `Minimal | `To_bottom | `To_top ] -> unit Core.Or_error.t Bonsai_web.Effect.t

Scrolls 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.

Sourceval into_view : ?smooth:bool -> selector:string -> [ `Minimal | `To_top | `To_bottom ] -> unit Core.Or_error.t Bonsai_web.Effect.t

Similar to the above function, but instead of scrolling to a position, it scrolls to a specific element

OCaml

Innovation. Community. Security.