mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-27 03:55:20 +03:00
Update contributing docs for js-sys
Tweak a few links here and there and otherwise mention that we should be complete and stage 4 proposals can be added in the future Closes #859
This commit is contained in:
parent
d10ca579e4
commit
752ad99cbd
@ -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)
|
||||
@ -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
|
||||
|
@ -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
|
||||
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user