Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Experimental WebAPI
GitHub

ReScript WebAPI

ReScript bindings for everything you need in the browser.

NPM Version

Install the package using your favorite package manager:

npmi@rescript/webapi@experimental

and add@rescript/webapi to yourrescript.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 inMDN.

// Note that this only works when you added the `-open WebAPI.Global` bsc flag.
letlocation=window.location
// Access properties using `.`
lethref=location.href
// Invoke methods using the `->TypeModule.method`
location->Location.reload

[8]ページ先頭

©2009-2025 Movatter.jp