Skip to content

JSPropertyDescriptor structure

Describes a property of a JavaScript object, including its name, value, and attributes. Can be converted to a JavaScript property descriptor object using the ToObject method.

C#
public struct JSPropertyDescriptor

Public Members

namedescription
JSPropertyDescriptor(…)Creates a property descriptor with a string name. (2 constructors)
static AccessorProperty(…)Creates a property descriptor with getter and/or setter callbacks.
static DataProperty(…)Creates a property descriptor with a value.
static Function(…)Creates a property descriptor with a method callback.
Attributes { get; }
Data { get; }Gets the optional context data object to be passed to getter/setter or method callbacks.
Getter { get; }
Method { get; }
Name { get; }
NameValue { get; }
Setter { get; }
Value { get; }
ToObject()Converts the structure to a JavaScript property descriptor object.
explicit operatorConverts the structure to a JavaScript property descriptor object.

See Also

Released under the MIT license