mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-14 21:41:23 +00:00
js-sys: Document that new bindings should take JS things by shared ref
This commit is contained in:
@ -42,6 +42,9 @@ use wasm_bindgen::prelude::*;
|
|||||||
// * Add a new `#[test]` into the appropriate file in the
|
// * Add a new `#[test]` into the appropriate file in the
|
||||||
// `crates/js-sys/tests/wasm/` directory. If the imported function or method
|
// `crates/js-sys/tests/wasm/` directory. If the imported function or method
|
||||||
// can throw an exception, make sure to also add test coverage for that case.
|
// can throw an exception, make sure to also add test coverage for that case.
|
||||||
|
//
|
||||||
|
// * Arguments that are `JsValue`s or imported JavaScript types should be taken
|
||||||
|
// by reference.
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
Reference in New Issue
Block a user