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/src/bonsai.web_ui_element_size_hooks/import.ml.html
Source file import.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23open! Core open Js_of_ocaml let cancel_animation_frame id = Dom_html.window##cancelAnimationFrame id let request_animation_frame f = Dom_html.window##requestAnimationFrame (Js.wrap_callback f) ;; let add_event_listener ?(use_capture = false) ?(prevent_default = false) element event ~f = Dom_html.addEventListener element event (Dom.full_handler (fun element event -> f element event; Js.bool prevent_default)) (Js.bool use_capture) ;; let set_width element x = element##.style##.width := Js.string (sprintf "%fpx" x) let set_height element x = element##.style##.height := Js.string (sprintf "%fpx" x) let reset_width element = element##.style##.width := Js.string "" let reset_height element = element##.style##.height := Js.string ""
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>