feat(Map/MapIterator): add Map.entries

This commit is contained in:
Jannik Keye
2018-06-28 21:58:34 +02:00
parent ea19775639
commit 228abaa4ae
3 changed files with 51 additions and 0 deletions

View File

@ -355,6 +355,20 @@ extern {
pub fn size(this: &Map) -> Number;
}
// Map Iterator
#[wasm_bindgen]
extern {
pub type MapIterator;
/// The entries() method returns a new Iterator object that contains
/// the [key, value] pairs for each element in the Map object in
/// insertion order.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries
#[wasm_bindgen(method)]
pub fn entries(this: &Map) -> MapIterator;
}
// Math
#[wasm_bindgen]
extern {