wasm-bindgen/crates/webidl-tests/array_buffer.rs
Alex Crichton 457efc0f31 Implement support for WebIDL Callback types
This commit adds support for the WebIDL `Callback` type by translating all
callbacks to the `js_sys::Function` type. This will enable passing raw JS values
into callbacks as well as Rust valus using the `Closure` type.

This commit doesn't currently implement "callback interfaces" in WebIDL, that's
left for a follow-up commit.
2018-09-06 19:50:46 -07:00

12 lines
273 B
Rust

use wasm_bindgen_test::*;
include!(concat!(env!("OUT_DIR"), "/array_buffer.rs"));
#[wasm_bindgen_test]
fn take_and_return_a_bunch_of_slices() {
let f = ArrayBufferTest::new().unwrap();
let x = f.get_buffer();
f.set_buffer(None);
f.set_buffer(Some(&x));
}