/// <summary> /// Defines a new object's own property from a property descriptor. /// </summary> /// <remarks> /// Requires an active script context. /// </remarks> /// <param name="propertyId">The ID of the property.</param> /// <param name="propertyDescriptor">The property descriptor.</param> /// <returns>Whether the property was defined.</returns> public bool DefineProperty(JavaScriptPropertyId propertyId, JavaScriptValue propertyDescriptor) { bool result; Native.ThrowIfError(Native.JsDefineProperty(this, propertyId, propertyDescriptor, out result)); return(result); }
/// <summary> /// Defines a new object's own property from a property descriptor. /// </summary> /// <remarks> /// Requires an active script context. /// </remarks> /// <param name="propertyId">The ID of the property.</param> /// <param name="propertyDescriptor">The property descriptor.</param> /// <returns>Whether the property was defined.</returns> public Boolean DefineProperty(JavaScriptPropertyId propertyId, JavaScriptValue propertyDescriptor) { Native.ThrowIfError(Native.JsDefineProperty(this, propertyId, propertyDescriptor, out Boolean result)); return(result); }