Merge pull request #830 from alexcrichton/fix-web-sys-dep

Fix dependencies sections for `web-sys` in guide
This commit is contained in:
Nick Fitzgerald 2018-09-14 14:27:15 -07:00 committed by GitHub
commit 8da2e4dca2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,11 +8,11 @@ on the git version of it, and of `wasm-bindgen`:*
```toml
[dependencies]
wasm-bindgen = { git = "https://github.com/rustwasm/wasm-bindgen" }
web-sys = {
git = "https://github.com/rustwasm/wasm-bindgen",
features = [
]
}
[dependencies.web-sys]
git = "https://github.com/rustwasm/wasm-bindgen"
features = [
]
```
## Enable the cargo features for the APIs you're using
@ -30,12 +30,11 @@ documentation][search-resize-to]. We would find [the
in `Cargo.toml`:
```toml
web-sys = {
git = "https://github.com/rustwasm/wasm-bindgen",
features = [
"Window",
]
}
[dependencies.web-sys]
git = "https://github.com/rustwasm/wasm-bindgen"
features = [
"Window"
]
```
## Call the method!