package brr
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Browser programming toolkit for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
brr-0.0.7.tbz
sha512=4b3d42eb6a32c1d6f1c5ef003f5311b5029156b31f6e51af098b695c769699e0304b66afd2dd574ecf1084e095bbbc4eac552daab083766cd81ed2f1d9897d51
doc/CHANGES.html
v0.0.7 2024-07-30 Zagreb
- Add support for
wasm_of_ocaml. Thanks to Jérôme Vouillon for the patchset (#51). - Deprecate
Tarray.{get,set}. These function become less efficient in order to support wasm_of_ocaml. UseTarray.to_bigarray1to convert to a bigarray and operate on that instead (#51). - Fix
Jstr.pad_{start,end}specifying the [pad] optional argument was being ignored. Thanks to Valentin Gatien-Baron for noticing. - Add
Jv.is_arraya binding toArray.isArraywhich is the recommended way to test a value for an array. Thanks to Valentin Gatien-Baron for the patch (#59). - Fix
Brr_webaudio.Audio.Node.Media_element_source.createtheMediaElementAudioSourceNodeproperty was mispelled. Thanks to Emile Trotignon for the report and the patch (#57). - Fix
Fut.tickin the presence of effects compilation. - Add
At.downloadattribute constructor. - Fix
At.draggable. It is enumerated not a boolean attribute. Thanks to Ulysse for the patch (#55). At.class'attribute values. Allow to specify multiple classes in a singleAt.tvalue. This was not possible before which is surprising. Thanks to Basile Clément for noticing and patching (#53).
v0.0.6 2023-07-29 Zagreb
- The experimental library
brr.notehas been migrated to thenote.brrlibrary available via thenotepackage. The toplevel modules were renamed fromBrr_note*toNote_brr*. Fix encoding mess in
Brr.Uriwhich tried to expose a model that is not workable in practice due to the way the URI standard is defined.- Accessors and
Uri.with_urino longer perform percent decoding and encoding for you. - Added helper functions
Uri.[with_]{query,fragment}_params. - Added helper functions
Uri.[with_]{path_segments}.
Thanks to Max Lang for the report and making sure the new API makes sense (#50).
- Accessors and
Add canvas color space support (note: unsupported on Firefox for now).
C2d.attrs, addcolor_spaceandwill_read_frequentlyattributes.- Add
C2d.Image_data.color_spaceand a?color_spaceoptional argument toC2d.{create,get}_image_dataandC2d.Image_data.create.
Brr.Blob.{array_buffer,text,data_uri}: add an optional argument?progress. If provided the load happens via aFileReaderobject and load progress is reported (#39).- Updated developer tool console to Manifest V3 (#44).
v0.0.5 2023-05-10 La Forclaz (VS)
- Add
Brr_webgpu, bindings for WebGPU. Supported by a grant from the OCaml Software Foundation. Brr.El.scroll_into_view, makealign_valign according to specification (did the exact converse).Brr_io.Fetch.cachebecomes a function takingunit. It seems accessing it at initalisation time trips the (latest ?) Firefox WebWorkers.- Make the
Brr_canvas.Glmodule initialisation bits safe when there is noWebGLRenderingContext. Thanks to Haochen Kotoi-Xie for reporting.
v0.0.4 2022-12-05 Zagreb
Changes for upcoming js_of_ocaml effect support
The following changes are needed for the upcoming effect support in js_of_ocaml. Thanks to Jérôme Vouillon for his help.
- Important Add
Jv.callback. When the effect support lands it will no longer be possible to invoke an OCaml functionffrom JavaScript by simply using(Jv.repr f)to get aJv.tvalue as was suggested in the cookbook. You have to use(Jv.callback ~arity f)witharitythe arity of the function. The recipes of the cookbook to deal with callbacks and exposing OCaml functions to JavaScript have been updated accordingly. Brr.Ev.listenno longer returnsunitbut an abstract value of typeBrr.Ev.listener. If you don't need to unlisten you can simplyignorethat value. If you do, see next point.Brr.Ev.unlistenis changed to take a value of typeBrr.Ev.listener. Previously you had to invoke it with the same arguments you gave toBrr.Ev.listenlike in JavaScript.
Additions
- Add
Brr_webmidi, bindings for Web MIDI. Brr.At, add support foraccesskey,action,autocomplete,autofocus,list,method,selected,styleattributes. Make sure MDN doc links do not 404.- Add
Brr.At.float. - Add
Brr.At.{void,is_void,if',if_some}and deprecateBrr.At.{add_if,add_if_some}. The new scheme if more convenient and clearer when working with list literals. - Add
Brr.File.relative_path. - Add
Brr_canvas.{C2d,Gl}.get_contextand deprecateBrr_canvas.{C2d,Gl}.createwhose names are misleading (#36). - Add
Brr_canvas.C2d.{set_transform',transform'}taking matrix components directly. - Add
Jstr.binary_{of,to}_octetsto convert between OCaml strings as sequence of bytes and JavaScript binary strings (#18 again)
Breaking changes
Brr.El.v, performAt.styleattribute merging like we do withAt.class. This is a breaking change if you hadEl.vcalls with multiplestyleattributes definition and expected the last one to take over. Note that theAt.stylevalue is introduced in this version.
Bug fixes and internal changes
- Fix
Brr_canvas.C2d.transformit was binding toresetTransforminstead oftransform(#38). - Adapt to
js_of_ocaml-toplevelchanges. - Make the modules' initialisation bits web worker safe. We had toplevel code that accessed properties of values that are not allowed in workers (e.g.
Brr.ElaccessingdocumentorBrr_noteaccessing mutation observers). These modules may still be linked in your web worker code (e.g. if you fork()-like your workers) in which case these toplevel initialisation bits would get executed and fail.
v0.0.3 2022-01-30 La Forclaz (VS)
Require
js_of_ocaml4.0.0:- Allows
brr,js_of_ocaml, andgen_js_apibindings to be used in the same program. - Adding
-no-check-primsduring bytecode linking is no longer required.
Thanks to Hugo Heuzard for making the ground work in
js_of_ocamland providing a patch (#2, #33).- Allows
- Add
Brr.Ev.beforeunload. - Add
Brr.Ev.Pointer.as_mouse. - Tweak
Brr.Ev.{Drag,Wheel}.as_mouse_eventintoBrr.Ev.{Drag,Wheel}.as_mouseto avoid coercion madness. - Add
Brr.El.{previous,next}_sibling. - Add
Brr.El.remove_inline_style. - Add
Brr.El.Style.{top,left,right,bottom,position,z_index}. - Fix
Blob.of_jstr. It was not working. Thanks to Kiran Gopinathan for the report (#31). Ev.target_{of,to}_jvtake and return aJv.tvalue instead of an'a. Thanks to Joseph Price for the report (#28).
v0.0.2 2021-09-23 Zagreb
- Change the
Brr.Base64module (atob,bota) to make it more useful and less error prone (#18). Thanks to Armaël Guéneau for shooting himself in the foot. - Add
Brr.Window.open'(#20). Thanks to Boris Dob for the suggestion and the patch. - Rename
Brr_webcrypto.Crypto_algo.rsassa_pks1_v1_5torsassa_pkcs1_v1_5. Thanks to Hannes Mehnert for the report and the fix. - Add
Brr.El.parent(#10). Thanks to Sébastien Dailly for the suggestion and the patch. - Add
Brr.El.{find_first_by_selector,fold_find_by_selector}to lookup elements by CSS selectors. Jstr.{starts_with,ends_with}, change labels to follow Stdlib labelling.- Add optional
baseargument toBrr.Uri.{v,of_jstr}. - Add
Brr.Uri.Params.is_empty. - Add
Brr_io.Form.Data.{is_empty,has_file_entry,of_uri_params,to_uri_params}. - Tweak interfaces of
Brr_canvas.Image_data.create,Brr_webaudio.Node.connect_node,Brr_webaudio.Node.connect_paramto not trigger the 4.12 definition of the warningunerasable-optional-argument. - Fix for uncaught JavaScript exceptions in the OCaml console (#21). The fix is brittle, the right fix is to solve (#2).
- Fix
Brr_canvas.Glfor browsers that do not support GL2 contexts. On these browsers this would lead to obscure failures in separate compilation mode. Thanks to Duncan Holm for the report (#9). - Fix wrong value of
Request.Credentials.include. - Fix
Blob.of_array_buffer(#23). Didn't work at all. Thanks to Armaël Guéneau for the report and the fix. - Fix
Jstr.concatwhensepis unspecified (#14). Thanks to Sébastien Dailly for the report. - Fix signature of
Brr_webcrypto.Subtle_crypto.{export,import}_key. Thanks to Romain Calascibetta for the report and the fix.
v0.0.1 2020-10-14 Zagreb
First release.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page