package vdom
All checked builds pass sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
DOM and VDOM for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
vdom-0.4.tbz
sha256=33216086eeeeed605c4580c83e7615cc7bb5401266b025a014fa470220d111cd
sha512=25da0cfa9f55407867e3b7b7fb39863bfce95762e3315c7298bf669517cc66525cf45b1673fd39e1781b800332b9b75ced98f28f8f1658d70abd6c015261a93e
doc/CHANGES.html
0.4
- Synchronization algorithm purely based on the VDOM, avoid reading from the real DOM
Vdom.autofocus_prevent_scrollVdom.onauxclick_cancelJs_browser: expose more of the DOM APIscroll_to_show: check visibility against the nearest scrollable ancestor (instead of the window) and honourscroll-margin-top/scroll-margin-bottomVdom.Decoder.mouse_event,key_event,paste_eventVdom_blit.extract_js_object,on_js_event,on_js_event_with_options,Custom.focus_event- Decoders: dotted field paths now also work for
extra_fields Js_browser.Promise: richer API (return,bind,map,all,catch, binding operators...); error handlers now receive anexn(breaking)Js_browser.FileReader.resultnow returnsOjs.t,read_as_binary_stringreplaced byread_as_array_buffer(breaking)Vdom.scroll_to_show: takes optional?behavior,?blockand?inlinearguments (as the browser'sscrollIntoView) instead of~align_top(~align_top:falsebecomes~block:End);~block:Nearestscrolls by the minimal amount needed (#60) (breaking)Js_browser.Element.scroll_into_view: takes an optional?optionsargument instead of a boolean (truebecomes(),falsebecomes~options:(scroll_into_view_options ~block:End ()) ()); the options are built withscroll_into_view_options ?behavior ?block ?inline (), which replaces both the record of that name and the functionscroll_into_view_optionsthat took it (breaking)Js_browser: new bindings (Intl,Selection,URLSearchParams,Notification,ResizeObserver,IntersectionObserver, clipboard, ...)- Requires OCaml >= 4.13 and js_of_ocaml-compiler >= 4.0.0
Warning: this version is not fully retro-compatible with the previous one. Existing code should be adapted slightly (see the entries marked "breaking").
0.3
Vdom.on: Custom browser event handlers with Elm-style JavaScript decoders- Fragments: virtual nodes not associated to a concrete DOM
- Option to propagate browser events occurring inside custom elements to the VDOM
Vdom.to_html: Native conversion of the VDOM to HTMLVdom_blit.Cmd.after_redraw: register a callback for after the next redraw in a command handler- Numerous additions to
Js_browserincluding support for the JavaScript modulesBase64,Blob,ClassList,FetchResponse,Navigator,TextDecoder
Warning: this version is not fully retro-compatible with the previous one. Existing code should be adapted slightly.
0.2
- GPR#14: delay rendering (view + DOM updates) with requestAnimationFrame
- GPR#15: click/dblclick handlers take a mouse_event argument (API change)
- GPR#16: improve support for checkboxes
- GPR#18: propagate DOM events upwards until finding a handler
- GPR#21: bindings for WebSockets (contributed by Levi Roth)
- GPR#22: Add window.inner{Width,Height} (contributed by 'copy')
- GPR#23: Add KeyboardEvent.{code,key} (contributed by 'copy')
- GPR#24: Make the vdom type covariant in the 'msg parameter (contributed by 'copy')
- GPR#25: Add MouseEvent.{movementX,movementY} (contributed by 'copy')
- GRP#30: Port build to dune + adds travis support
- GRP#32: Disposing custom elements
0.1
- GPR#5: double click handler (contributed by Stéphane Legrand)
- GPR#10: bindings for Date (contributed by Philippe Veber)
- GPR#8: binding for windows.location (contributed by Philippe Veber)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>