add binding for push

This commit is contained in:
Matt Long
2018-06-20 17:58:15 -04:00
parent 73081180cd
commit 4611d7bdba
2 changed files with 37 additions and 0 deletions

View File

@ -145,4 +145,10 @@ extern {
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/pop
#[wasm_bindgen(method)]
pub fn pop(this: &Array) -> JsValue;
/// The push() method adds one or more elements to the end of an array and returns the new length of the array.
///
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push
#[wasm_bindgen(method)]
pub fn push(this: &Array, value: JsValue) -> u32;
}