add binding for toString

This commit is contained in:
Matt Long
2018-06-20 18:23:26 -04:00
parent 3cf522d2df
commit eb6c2a239c
2 changed files with 37 additions and 1 deletions

View File

@ -171,4 +171,10 @@ extern {
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift
#[wasm_bindgen(method)]
pub fn unshift(this: &Array, value: JsValue) -> u32;
/// The toString() method returns a string representing the specified array and its elements.
///
/// http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString
#[wasm_bindgen(method, js_name = toString)]
pub fn to_string(this: &Array) -> String;
}