ReScript WebAPI
ReScript bindings for everything you need in the browser.
 Installation
Section titled “Installation”Install the package using your favorite package manager:
npm i @rescript/webapi@experimentalbun i @rescript/webapi@experimentaland add @rescript/webapi to your rescript.json:
{  "bs-dependencies": [    "@rescript/webapi",  ],  "bsc-flags": [    "-open WebAPI.Global"  ]}After installing the package , you can use bindings for the various Web APIs as defined in MDN.
// Note that this only works when you added the `-open WebAPI.Global` bsc flag.let location = window.location
// Access properties using `.`let href = location.href
// Invoke methods using the `->TypeModule.method`location->Location.reloadlet location = window.location;
let href = location.href;
location.reload();
export {  location,  href,}