rescript-webapi
rescript-webapi copied to clipboard
ReScript bindings to the DOM and other Web APIs
This is a relatively recent feature of ReScript, and will replace the variant-based code that requires runtime functions, for example: https://github.com/tinymce/rescript-webapi/blob/0c9e9211785852e69f2d2a17c765e63c5697217f/src/Webapi/Dom/Webapi__Dom__Element.re#L76-L86
As result of https://github.com/TheSpyder/rescript-webapi/issues/132 Path2d module added with following js bindings, see on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Path2D#instance_methods) - addPath - arc - arcTo - bezierCurveTo - closePath - ellipse - lineTo - moveTo...
Example of path2D as currently ```rescript let path: path2d = newPath2D("M24.85,10.126c2.018-4.783,6.628-8.125,11.99-8.125c7.223") ctx->beginPath ctx->strokePath2D(path) ctx->fillPath2D(path) ``` After working with react rescript bindings would expect Path2D to be it's own module like...