Skip to content

JSPropertyDescriptorList<TDerived,TObject>.AddProperty method (1 of 5)

Adds a property with an initial value of undefined.

C#
public TDerived AddProperty(string name, 
    JSPropertyAttributes attributes = JSPropertyAttributes.DefaultProperty)

See Also


JSPropertyDescriptorList<TDerived,TObject>.AddProperty method (2 of 5)

Adds a property with a specified initial value.

C#
public TDerived AddProperty(string name, JSValue value, 
    JSPropertyAttributes attributes = JSPropertyAttributes.DefaultProperty)

See Also


JSPropertyDescriptorList<TDerived,TObject>.AddProperty method (3 of 5)

Adds a property with getter and/or setter callbacks.

C#
public TDerived AddProperty(string name, Func<JSValue>? getter, Action<JSValue>? setter, 
    JSPropertyAttributes attributes = JSPropertyAttributes.DefaultProperty)

See Also


JSPropertyDescriptorList<TDerived,TObject>.AddProperty method (4 of 5)

Adds a property with getter and/or setter callbacks obtained from the wrapped object.

C#
public TDerived AddProperty(string name, Func<TObject, JSValue>? getter, 
    Action<TObject, JSValue>? setter, 
    JSPropertyAttributes attributes = JSPropertyAttributes.DefaultProperty)

See Also


JSPropertyDescriptorList<TDerived,TObject>.AddProperty method (5 of 5)

Adds a property with getter and/or setter callbacks.

C#
public TDerived AddProperty(string name, JSCallback? getter, JSCallback? setter, 
    JSPropertyAttributes attributes = JSPropertyAttributes.DefaultProperty, object? data = null)

See Also

Released under the MIT license