2018-09-10 17:51:44 -07:00
|
|
|
# The `web-sys` Crate
|
|
|
|
|
2018-11-17 09:57:43 -06:00
|
|
|
[The `web-sys` crate][web-sys] provides raw `wasm-bindgen` imports for all of the Web's
|
2018-09-10 17:51:44 -07:00
|
|
|
APIs. This includes:
|
|
|
|
|
|
|
|
* `window.fetch`
|
|
|
|
* `Node.prototype.appendChild`
|
|
|
|
* WebGL
|
|
|
|
* WebAudio
|
|
|
|
* and many more!
|
|
|
|
|
|
|
|
It's sort of like the `libc` crate, but for the Web.
|
|
|
|
|
|
|
|
It does *not* include the JavaScript APIs that are guaranteed to exist in all
|
|
|
|
standards-compliant ECMAScript environments, such as `Array`, `Date`, and
|
2018-11-17 09:57:43 -06:00
|
|
|
`eval`. Bindings for these APIs can be found in [the `js-sys` crate][js-sys].
|
2018-09-10 17:51:44 -07:00
|
|
|
|
|
|
|
## API Documentation
|
|
|
|
|
|
|
|
[**Read the `web-sys` API documentation here!**][api]
|
|
|
|
|
|
|
|
[api]: https://rustwasm.github.io/wasm-bindgen/api/web_sys/
|
2018-11-17 09:57:43 -06:00
|
|
|
[js-sys]: https://crates.io/crates/js-sys
|
2018-11-16 19:22:19 -06:00
|
|
|
[web-sys]: https://crates.io/crates/web-sys
|