Playground for implementing various missing Web API bindings for ReasonML/BuckleScript, namely:
- WebRTC
- IndexedDB (example)
- WebCrypto (example)
- So far only RSASSA-PKCS1-v1_5 and SHA-256 is supported
- Navigator offline/online events (example)
- WebSockets (example)
- Encoding (TextEncoder, TextDecoder)
DISCLAIMER: Not all API methods from W3 standards are implemented and functions signatures may change from commit to commit in here. I plan to merge these APIs into the original bs-webapi-incubator as soon as the typical use cases feel comfortable to use.
npm install bs-webapi-extra
and add a corresponding item to the bsconfig.json
:
"bs-dependencies": ["bs-webapi-extra"],
npm run build
npm run start
Examples are compiled during npm run build
.
Create a single app.js
file for browser using
npm run pack
Open example/example.html
in your web browser. You don't need a running web server.
Feel free to comment out examples you're not interested in inside the example/example.re
file.
If you use vscode
, Press Windows + Shift + B
it will build automatically