add binding for copyWithin

This commit is contained in:
Matt Long
2018-06-20 17:51:02 -04:00
parent d155136f0e
commit 2f6f734216
2 changed files with 41 additions and 1 deletions

View File

@ -133,4 +133,10 @@ extern {
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill
#[wasm_bindgen(method)]
pub fn fill(this: &Array, value: JsValue, start: u32, end: u32) -> Array;
/// The copyWithin() method shallow copies part of an array to another location in the same array and returns it, without modifying its size.
///
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin
#[wasm_bindgen(method, js_name = copyWithin)]
pub fn copy_within(this: &Array, target: i32, start: i32, end: i32) -> Array;
}