Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update contributing docs for js-sys #876

Merged
merged 1 commit into from
Sep 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions guide/src/contributing/js-sys/adding-more-apis.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# Adding Support for More JavaScript Global APIs

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:
As of 2018-09-24 we've [added all APIs][issue] in the current ECMAScript
standard (yay!). To that end you'll hopefully not find a missing API, but if you
do please feel free to file an issue!

* [ ] Comment on the issue saying which thing you are going to make bindings for
(so that we don't accidentally duplicate effort).
We currently add new APIs added to ECMAScript that are in [TC39 stage 4][tc39]
to this crate. If there's a new API in stage 4, feel free to file an issue as
well!

### Instructions for adding an API

* [ ] Find the `wasm-bindgen` issue for the API you'd like to add. If this
doesn't exist, feel free to open one! Afterwards be sure to comment on the
issue to avoid duplication of work.

* [ ] Open the [MDN
page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects)
Expand All @@ -19,9 +26,10 @@ to follow are:

* [ ] 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][test]

* [ ] Send a pull request!

[issue]: https://github.com/rustwasm/wasm-bindgen/issues/275
[tc39]: https://tc39.github.io/process-document/
[test]: testing.html
9 changes: 2 additions & 7 deletions guide/src/contributing/js-sys/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,8 @@ pub fn timed(callback: &js_sys::Function) -> f64 {
}
```

The `js-sys` crate isn't quite 100% feature complete yet. There are still some
JavaScript types and methods that we don't have bindings for. If you'd like to
help out check out [the contribution documentation][contrib].

Also, as mentioned above, the `js-sys` crate doesn't contain bindings to any Web
APIs like [`document.querySelectorAll`][mdn-qsa]. These will be part of the
The `js-sys` crate doesn't contain bindings to any Web APIs like
[`document.querySelectorAll`][mdn-qsa]. These will be part of the
[`web-sys`](./web-sys.html) crate.

[MDN]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects
Expand All @@ -48,4 +44,3 @@ APIs like [`document.querySelectorAll`][mdn-qsa]. These will be part of the
[web-sys-contributing]: https://rustwasm.github.io/wasm-bindgen/web-sys.html
[web-sys-issues]: https://github.com/rustwasm/wasm-bindgen/issues?q=is%3Aissue+is%3Aopen+label%3Aweb-sys
[mdn-date-now]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now
[contrib]: https://github.com/rustwasm/wasm-bindgen/issues/275
2 changes: 1 addition & 1 deletion guide/src/contributing/js-sys/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ cargo test --target wasm32-unknown-unknown
```

These tests are largely executed in Node.js right now via the
`wasm-bindgen-test` framework. More documentation on the framework coming soon!
[`wasm-bindgen-test` framework](../../wasm-bindgen-test/index.html)