Available on crate feature
dep_js_sys
only.Functions§
- apply
- The static
Reflect.apply()
method calls a target function with arguments as specified. - construct
- 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. - construct_
with_ new_ target - 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. - define_
property - The static
Reflect.defineProperty()
method is likeObject.defineProperty()
but returns aBoolean
. - delete_
property - The static
Reflect.deleteProperty()
method allows to delete properties. It is like thedelete
operator as a function. - get
- The static
Reflect.get()
method works like getting a property from an object (target[propertyKey]
) as a function. - get_f64
- The same as
get
except the key is anf64
, which is slightly faster. - get_
own_ property_ descriptor - 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. - get_
prototype_ of - 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. - get_u32
- The same as
get
except the key is au32
, which is slightly faster. - has
- The static
Reflect.has()
method works like the in operator as a function. - is_
extensible - 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. - own_
keys - The static
Reflect.ownKeys()
method returns an array of the target object’s own property keys. - prevent_
extensions - 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. - set
- The static
Reflect.set()
method works like setting a property on an object. - set_f64
- The same as
set
except the key is anf64
, which is slightly faster. - set_
prototype_ of - 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. - set_u32
- The same as
set
except the key is au32
, which is slightly faster. - set_
with_ receiver - The static
Reflect.set()
method works like setting a property on an object.