0.4.3 • Published 7 years ago
bs-webapi-extra v0.4.3
bs-webapi-extra
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.
Use
npm install bs-webapi-extraand add a corresponding item to the bsconfig.json:
"bs-dependencies": ["bs-webapi-extra"],Development
Build
npm run buildBuild + Watch
npm run startRun Examples
Examples are compiled during npm run build.
Create a single app.js file for browser using
npm run packOpen 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.
Editor
If you use vscode, Press Windows + Shift + B it will build automatically