JSPropertyDescriptor.AccessorProperty method
Creates a property descriptor with getter and/or setter callbacks.
C#
public static JSPropertyDescriptor AccessorProperty(string name, JSCallback? getter = null,
JSCallback? setter = null, JSPropertyAttributes attributes = JSPropertyAttributes.Default,
object? data = null)
Exceptions
exception | condition |
---|---|
ArgumentException | Both getter and setter are null. |
See Also
- delegate JSCallback
- enum JSPropertyAttributes
- struct JSPropertyDescriptor
- namespace Microsoft.JavaScript.NodeApi