wasm-bindgen/tests/wasm
Alex Crichton 7b495468f6 Implement support for Uint8ClampedArray
This commit implements support for binding APIs that take
`Uint8ClampedArray` in JS. This is pretty rare but comes up in a
`web-sys` binding or two, and we're now able to bind these APIs instead
of having to omit the bindings.

The `Uint8ClampedArray` type is bound by using the `Clamped` marker
struct in Rust. For example this is declaring a JS API that takes
`Uint8ClampedArray`:

    use wasm_bindgen::Clamped;

    #[wasm_bindgen]
    extern {
        fn takes_clamped(a: Clamped<&[u8]>);
    }

The `Clamped` type currently only works when wrapping the `&[u8]`, `&mut
[u8]`, and `Vec<u8>` types. Everything else will produce an error at
`wasm-bindgen` time.

Closes #421
2018-09-24 13:58:37 -07:00
..
api.js Port tests that use only basic features 2018-08-04 22:25:29 -05:00
api.rs Add an accessor for wasm's own memory as a JS object 2018-08-27 11:05:55 -07:00
char.js Port tests that use only basic features 2018-08-04 22:25:29 -05:00
char.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
classes.js Remove the need for a ConstructorToken 2018-09-21 17:42:06 -07:00
classes.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
closures.js Port tests that use only basic features 2018-08-04 22:25:29 -05:00
closures.rs Move the unsize feature behind a nightly Cargo feature 2018-08-19 14:45:59 -07:00
comments.js Move comments test to wasm 2018-08-06 11:46:23 -07:00
comments.rs Move comments test to wasm 2018-08-06 11:46:23 -07:00
duplicate_deps.js Migrate rest of dependencies test to wasm 2018-08-06 10:42:08 -07:00
duplicate_deps.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
duplicates_a.js Support importing same-name statics from two modules 2018-08-20 10:56:58 -07:00
duplicates_b.js Support importing same-name statics from two modules 2018-08-20 10:56:58 -07:00
duplicates_c.js Support importing same-name statics from two modules 2018-08-20 10:56:58 -07:00
duplicates.rs Support importing same-name statics from two modules 2018-08-20 10:56:58 -07:00
enums.js Port tests that use only basic features 2018-08-04 22:25:29 -05:00
enums.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
import_class.js Fix the constructor and catch attributes combined 2018-08-20 10:40:54 -07:00
import_class.rs Support #[wasm_bindgen(setter, js_name = ...)] 2018-09-21 17:54:26 -07:00
imports.js Only generate JS null checks in debug mode 2018-09-21 16:10:02 -07:00
imports.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
js_objects.js Migrate the serde-serialize test to wasm 2018-08-06 09:43:55 -07:00
js_objects.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
jscast.js Implement #[wasm_bindgen(extends = ...)] 2018-08-07 13:04:11 -07:00
jscast.rs Rebase fallout and review comments 2018-08-07 13:24:48 -07:00
main.rs Allow returning Result from functions 2018-09-18 13:13:59 -07:00
math.js Port tests that use only basic features 2018-08-04 22:25:29 -05:00
math.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
node.js Move node test over to wasm 2018-08-06 10:06:45 -07:00
node.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
option.js Port tests that use only basic features 2018-08-04 22:25:29 -05:00
option.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
optional_primitives.js Port tests that use only basic features 2018-08-04 22:25:29 -05:00
optional_primitives.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
rethrow.js Allow returning Result from functions 2018-09-18 13:13:59 -07:00
rethrow.rs Allow returning Result from functions 2018-09-18 13:13:59 -07:00
simple.js Use the JS name of an imported type for instanceof checks 2018-08-08 14:42:21 -07:00
simple.rs Use the JS name of an imported type for instanceof checks 2018-08-08 14:42:21 -07:00
slice.js Implement support for Uint8ClampedArray 2018-09-24 13:58:37 -07:00
slice.rs Implement support for Uint8ClampedArray 2018-09-24 13:58:37 -07:00
structural.js Port tests that use only basic features 2018-08-04 22:25:29 -05:00
structural.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
u64.js Port tests that use only basic features 2018-08-04 22:25:29 -05:00
u64.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
validate_prt.js Only generate JS null checks in debug mode 2018-09-21 16:10:02 -07:00
validate_prt.rs Remove support for the version attribute 2018-08-06 13:30:28 -05:00
variadic.js Add docs and remove typecheck from variadic attribute 2018-09-01 13:55:35 +01:00
variadic.rs Add docs and remove typecheck from variadic attribute 2018-09-01 13:55:35 +01:00