JsMap

class JsMap[K, V]() extends JsIterable[Tuple2[K, V]]

The Map object holds key-value pairs and remembers the original insertion order of the keys. Any value (both objects and primitive values) may be used as either a key or a value. The Map is mutable, like everything in JS.

Note that Javascript === equality semantics apply. JsMap does not know anything about Scala equals method or the case classes structural equality.

See also:
Companion:
object
trait JsIterable[Tuple2[K, V]]
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Constructors

def this(iterable: JsIterable[Tuple2[K, V]])

!! Passing iterable is not supported by IE - populate the Map separately if needed.

!! Passing iterable is not supported by IE - populate the Map separately if needed.

Concrete methods

def asJsIterable: JsIterable[Tuple2[K, V]]
Implicitly added by RichJsMap
def asScalaJs: Map[K, V]
Implicitly added by RichJsMap
def clear(): Unit
def delete(key: K): Boolean
def entries(): JsIterable[Tuple2[K, V]] & Iterator[Tuple2[K, V]]

!! Not supported by IE !!

!! Not supported by IE !!

def forEach(f: Function2[V, K, Unit]): Unit
def get(key: K): UndefOr[V]
def has(key: K): Boolean
def keys(): JsIterable[K] & Iterator[K]

!! Not supported by IE !!

!! Not supported by IE !!

def set(key: K, value: V): JsMap[K, V]

!! Not fully supported by IE - returns js.undefined instead of Map

!! Not fully supported by IE - returns js.undefined instead of Map

def size: Int
def values(): JsIterable[V] & Iterator[V]

!! Not supported by IE !!

!! Not supported by IE !!

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def iterator(): Iterator[A]

!! Not supported by IE !!

!! Not supported by IE !!

Inherited from:
JsIterable
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object

Concrete fields

val map: JsMap[K, V]
Implicitly added by RichJsMap