ObjectConstructor

@native @JSType trait ObjectConstructor extends StObject with Instantiable0[Object] with Instantiable1[Any, Object]
trait Instantiable1[Any, Object]
trait Instantiable0[Object]
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(): Any
def apply(value: Any): Any
def assign(target: Object, sources: Any*): Any

Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

Value Params
sources

One or more source objects from which to copy properties

target

The target object to copy to.

def assign[T, U](target: T, source: U): T & U

Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

Value Params
source

The source object from which to copy properties.

target

The target object to copy to.

def assign[T, U, V](target: T, source1: U, source2: V): T & U & V

Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

Value Params
source1

The first source object from which to copy properties.

source2

The second source object from which to copy properties.

target

The target object to copy to.

def assign[T, U, V, W](target: T, source1: U, source2: V, source3: W): T & U & V & W

Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

Value Params
source1

The first source object from which to copy properties.

source2

The second source object from which to copy properties.

source3

The third source object from which to copy properties.

target

The target object to copy to.

def create(): Any

Creates an object that has the specified prototype or that has null prototype.

Creates an object that has the specified prototype or that has null prototype.

Value Params
o

Object to use as a prototype. May be null.

def create(o: Object): Any
def create(o: Object, properties: PropertyDescriptorMap & ThisType[Any]): Any

Creates an object that has the specified prototype, and that optionally contains specified properties.

Creates an object that has the specified prototype, and that optionally contains specified properties.

Value Params
o

Object to use as a prototype. May be null

properties

JavaScript object that contains one or more property descriptors.

def create(o: Null, properties: PropertyDescriptorMap & ThisType[Any]): Any
def defineProperties[T](o: T, properties: PropertyDescriptorMap & ThisType[Any]): T

Adds one or more properties to an object, and/or modifies attributes of existing properties.

Adds one or more properties to an object, and/or modifies attributes of existing properties.

Value Params
o

Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.

properties

JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.

def defineProperty[T](o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType[Any]): T

Adds a property to an object, or modifies attributes of an existing property.

Adds a property to an object, or modifies attributes of an existing property.

Value Params
attributes

Descriptor for the property. It can be for a data property or an accessor property.

o

Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.

p

The property name.

def entries(o: Object): Array[Tuple2[String, Any]]

Returns an array of key/values of the enumerable properties of an object

Returns an array of key/values of the enumerable properties of an object

Value Params
o

Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.

def entries[T](o: ArrayLike[T]): Array[Tuple2[String, T]]
def entries[T](o: StringDictionary[T]): Array[Tuple2[String, T]]

Returns an array of key/values of the enumerable properties of an object

Returns an array of key/values of the enumerable properties of an object

Value Params
o

Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.

def freeze[T](a: Array[T]): Array[T]

Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

Value Params
o

Object on which to lock the attributes.

def freeze[T](f: T): T

Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

Value Params
o

Object on which to lock the attributes.

@JSName("freeze")
def freeze_T[T](o: T): T

Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

Value Params
o

Object on which to lock the attributes.

def fromEntries(entries: Iterable[Array[Any]]): Any

Returns an object created by key-value entries for properties and methods

Returns an object created by key-value entries for properties and methods

Value Params
entries

An iterable object that contains key-value entries for properties and methods.

@JSName("fromEntries")
def fromEntries_T_StringDictionary[T](entries: Iterable[Tuple2[PropertyKey, T]]): StringDictionary[T]

Returns an object created by key-value entries for properties and methods

Returns an object created by key-value entries for properties and methods

Value Params
entries

An iterable object that contains key-value entries for properties and methods.

def getOwnPropertyDescriptor(o: Any, p: PropertyKey): UndefOr[PropertyDescriptor]

Gets the own property descriptor of the specified object. An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.

Gets the own property descriptor of the specified object. An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.

Value Params
o

Object that contains the property.

p

Name of the property.

def getOwnPropertyDescriptors[T](o: T): ObjectConstructor & TopLevel[T] & StringDictionary[PropertyDescriptor]

Returns an object containing all own property descriptors of an object

Returns an object containing all own property descriptors of an object

Value Params
o

Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.

def getOwnPropertyNames(o: Any): Array[String]

Returns the names of the own properties of an object. The own properties of an object are those that are defined directly on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.

Returns the names of the own properties of an object. The own properties of an object are those that are defined directly on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.

Value Params
o

Object that contains the own properties.

def getOwnPropertySymbols(o: Any): Array[Symbol]

Returns an array of all symbol properties found directly on object o.

Returns an array of all symbol properties found directly on object o.

Value Params
o

Object to retrieve the symbols from.

def getPrototypeOf(o: Any): Any

Returns the prototype of an object.

Returns the prototype of an object.

Value Params
o

The object that references the prototype.

def is(value1: Any, value2: Any): Boolean

Returns true if the values are the same value, false otherwise.

Returns true if the values are the same value, false otherwise.

Value Params
value1

The first value.

value2

The second value.

def isExtensible(o: Any): Boolean

Returns a value that indicates whether new properties can be added to an object.

Returns a value that indicates whether new properties can be added to an object.

Value Params
o

Object to test.

def isFrozen(o: Any): Boolean

Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.

Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.

Value Params
o

Object to test.

def isSealed(o: Any): Boolean

Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.

Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.

Value Params
o

Object to test.

def keys(o: Object): Array[String]

Returns the names of the enumerable string properties and methods of an object.

Returns the names of the enumerable string properties and methods of an object.

Value Params
o

Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.

def preventExtensions[T](o: T): T

Prevents the addition of new properties to an object.

Prevents the addition of new properties to an object.

Value Params
o

Object to make non-extensible.

def seal[T](o: T): T

Prevents the modification of attributes of existing properties, and prevents the addition of new properties.

Prevents the modification of attributes of existing properties, and prevents the addition of new properties.

Value Params
o

Object on which to lock the attributes.

def setPrototypeOf(o: Any): Any

Sets the prototype of a specified object o to object proto or null. Returns the object o.

Sets the prototype of a specified object o to object proto or null. Returns the object o.

Value Params
o

The object to change its prototype.

proto

The value of the new prototype or null.

def setPrototypeOf(o: Any, proto: Object): Any
def values(o: Object): Array[Any]

Returns an array of values of the enumerable properties of an object

Returns an array of values of the enumerable properties of an object

Value Params
o

Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.

def values[T](o: ArrayLike[T]): Array[T]
def values[T](o: StringDictionary[T]): Array[T]

Returns an array of values of the enumerable properties of an object

Returns an array of values of the enumerable properties of an object

Value Params
o

Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.

Inherited methods

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