mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-28 12:32:37 +03:00
Js sys contributing (#574)
* guide: js-sys testing page should refer to js-sys not web-sys * guide: Use checklist for adding new js-sys APIs
This commit is contained in:
parent
01194558bf
commit
decdbd92b8
@ -1,26 +1,27 @@
|
||||
# Adding more APIs
|
||||
# Adding Support for More JavaScript Global APIs
|
||||
|
||||
We've got a [GitHub issue][issue] tracking the remaining APIs that need to be
|
||||
added to the `js-sys` crate, and we'd love your help in contributing! The steps
|
||||
We've got a [GitHub issue][issue] tracking the remaining APIs that still need to
|
||||
be added to the `js-sys` crate, and we'd love your help adding them! The steps
|
||||
to follow are:
|
||||
|
||||
* Comment on the issue saying which thing you are going to make bindings for
|
||||
* [ ] Comment on the issue saying which thing you are going to make bindings for
|
||||
(so that we don't accidentally duplicate effort).
|
||||
|
||||
* Open the [MDN
|
||||
* [ ] Open the [MDN
|
||||
page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects)
|
||||
for the relevant JS API.
|
||||
|
||||
* Open `crates/js-sys/src/lib.rs` in your editor; this is the file where we are
|
||||
implementing the bindings.
|
||||
* [ ] Open `crates/js-sys/src/lib.rs` in your editor; this is the file where we
|
||||
are implementing the bindings.
|
||||
|
||||
* Follow the instructions in the top of `crates/js-sys/src/lib.rs` about how to
|
||||
add new bindings.
|
||||
* [ ] Follow the instructions in the top of `crates/js-sys/src/lib.rs` about how
|
||||
to add new bindings.
|
||||
|
||||
* Add a test for the new binding to `crates/js-sys/tests/wasm/MyType.rs`
|
||||
* [ ] Add a test for the new binding to `crates/js-sys/tests/wasm/MyType.rs`
|
||||
|
||||
* Run the JS global API bindings tests with `cargo test -p js-sys --target wasm32-unknown-unknown`
|
||||
* [ ] Run the JS global API bindings tests with `cargo test -p js-sys --target
|
||||
wasm32-unknown-unknown`
|
||||
|
||||
* Send a pull request!
|
||||
* [ ] Send a pull request!
|
||||
|
||||
[issue]: https://github.com/rustwasm/wasm-bindgen/issues/275
|
||||
|
@ -1,11 +1,11 @@
|
||||
# Testing
|
||||
|
||||
You can test the `js-sys` crate by running `cargo test --target
|
||||
wasm32-unknown-unknown` within the `crates/web-sys` directory in the
|
||||
wasm32-unknown-unknown` within the `crates/js-sys` directory in the
|
||||
`wasm-bindgen` repository:
|
||||
|
||||
```sh
|
||||
cd wasm-bindgen/crates/web-sys
|
||||
cd wasm-bindgen/crates/js-sys
|
||||
cargo test --target wasm32-unknown-unknown
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user