JsSet

com.raquo.ew.JsSet
See theJsSet companion object
class JsSet[A]() extends JsIterable[A]

Set objects are collections of unique values. You can iterate through the elements of a set in insertion order. A value in the Set may only occur once; it is unique in the Set's collection. Sets are mutable, like everything in JS

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

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.

Attributes

See also
Companion
object
Graph
Supertypes
trait JsIterable[A]
class Object
trait Any
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this(iterable: JsIterable[A])

!! 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.

Attributes

Concrete methods

def add(value: A): JsSet[A]

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

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

Attributes

def asScalaJs: Set[A]
Implicitly added by RichJsSet

Cast a JsSet to js.Set. It's safe because they have the same runtime representation.

Cast a JsSet to js.Set. It's safe because they have the same runtime representation.

Attributes

def clear(): Unit

!! Not supported by IE !!

!! Not supported by IE !!

Attributes

def delete(value: A): Boolean
def forEach(f: Function1[A, Unit]): Unit

Note: this might be a bit slower than Scala.js js.Set.foreach implementation in some browsers, however the native JS method works in IE 11, whereas the Scala.js implementation uses JS iterables, which are not supported in any IE version.

Note: this might be a bit slower than Scala.js js.Set.foreach implementation in some browsers, however the native JS method works in IE 11, whereas the Scala.js implementation uses JS iterables, which are not supported in any IE version.

Attributes

def has(value: A): Boolean
def keys(): JsIterable[A] & Iterator[A]

Alias for values.

Alias for values.

!! Not supported by IE !!

Attributes

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

!! Not supported by IE !!

!! Not supported by IE !!

Attributes

Inherited methods

def hasOwnProperty(v: String): Boolean

Attributes

Inherited from:
Object
def isPrototypeOf(v: Object): Boolean

Attributes

Inherited from:
Object
def iterator(): Iterator[A]

!! Not supported by IE !!

!! Not supported by IE !!

Attributes

Inherited from:
JsIterable
def propertyIsEnumerable(v: String): Boolean

Attributes

Inherited from:
Object
def toLocaleString(): String

Attributes

Inherited from:
Object
def valueOf(): Any

Attributes

Inherited from:
Object

Concrete fields

val set: JsSet[A]
Implicitly added by RichJsSet