rescript-webapi
rescript-webapi copied to clipboard
ReScript bindings to the DOM and other Web APIs
#97 happened because there aren't tests that ensure data returned from `fetch` APIs can be used by other blob and file APIs. We should write tests for this (remember we...
https://github.com/tinymce/rescript-webapi/blob/55f4010c35c6b1f1c9301ba3e47120dacdb5587a/tests/Webapi/Canvas/Webapi__Canvas__Canvas2d__test.res#L27-L37 In this context, `s` is not a string. The compiler requires it to be `gradient`. It also requires the `_` of the third match to be a gradient. It...
There are two problems with our tests: 1. They use `let _ = blah()` which means if the type of a method changes the test still compiles. This is not...
I'm not sure where the inspiration for the current bindings came from, but in them "byob" readers don't have a `read` method. This is not true: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/read https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/read They even...
- [TextEncoder](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) - [TextDecoder](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) Both are available on browsers, Node.js, and Deno. In most cases, it is used without arguments ```res // UTF-8 encoding/decoding let e = TextEncoder.make() e->TextEncoder.encoding //...
https://tc39.es/proposal-temporal/docs Currently incomplete, need to clean the rest up before committing them. Couple of questions on approach: - Is there a way to more directly type functions that type option...
Relates to #30 and #38 Changes `mode`, `credentials`, `cache`, and `redirect` to use polymorphic variants. I've left destination and `referrerPolicy` untouched for now as they have some problems. See https://github.com/tinymce/rescript-webapi/issues/38#issuecomment-998956905
Thought I would open this tracking issue for Intl support. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl
This library will be far from "complete" at v1 due to many missing bindings, but also it will be forever expanding as the web platform expands. Couple this with the...
The HtmlElement.ofNode function is just inherited from Element so it allows you to pass in Elements and get them converted to HtmlElements without any check so it's not really type...