Available on crate feature
dep_web_sys
only.Functions§
- The static
Reflect.apply()
method calls a target function with arguments as specified. - The static
Reflect.construct()
method acts like the new operator, but as a function. It is equivalent to callingnew target(...args)
. It gives also the added option to specify a different prototype. - The static
Reflect.construct()
method acts like the new operator, but as a function. It is equivalent to callingnew target(...args)
. It gives also the added option to specify a different prototype. - The static
Reflect.defineProperty()
method is likeObject.defineProperty()
but returns aBoolean
. - The static
Reflect.deleteProperty()
method allows to delete properties. It is like thedelete
operator as a function. - The static
Reflect.get()
method works like getting a property from an object (target[propertyKey]
) as a function. - The same as
get
except the key is anf64
, which is slightly faster. - The static
Reflect.getOwnPropertyDescriptor()
method is similar toObject.getOwnPropertyDescriptor()
. It returns a property descriptor of the given property if it exists on the object,undefined
otherwise. - The static
Reflect.getPrototypeOf()
method is almost the same method asObject.getPrototypeOf()
. It returns the prototype (i.e. the value of the internal[[Prototype]]
property) of the specified object. - The same as
get
except the key is au32
, which is slightly faster. - The static
Reflect.has()
method works like the in operator as a function. - The static
Reflect.isExtensible()
method determines if an object is extensible (whether it can have new properties added to it). It is similar toObject.isExtensible()
, but with some differences. - The static
Reflect.ownKeys()
method returns an array of the target object’s own property keys. - The static
Reflect.preventExtensions()
method prevents new properties from ever being added to an object (i.e. prevents future extensions to the object). It is similar toObject.preventExtensions()
, but with some differences. - The static
Reflect.set()
method works like setting a property on an object. - The same as
set
except the key is anf64
, which is slightly faster. - The static
Reflect.setPrototypeOf()
method is the same method asObject.setPrototypeOf()
. It sets the prototype (i.e., the internal[[Prototype]]
property) of a specified object to another object or to null. - The same as
set
except the key is au32
, which is slightly faster. - The static
Reflect.set()
method works like setting a property on an object.