public void SetProperty(JsPropertyId id, JsValue value, bool useStrictRules) { JsErrorHelpers.ThrowIfError(NativeMethods.JsSetProperty(this, id, value, useStrictRules)); }
private static void SetNonEnumerableProperty(JsValue objValue, string name, JsValue value) { JsValue descriptorValue = JsValue.CreateObject(); descriptorValue.SetProperty("enumerable", JsValue.False, true); descriptorValue.SetProperty("writable", JsValue.True, true); JsPropertyId id = JsPropertyId.FromString(name); objValue.DefineProperty(id, descriptorValue); objValue.SetProperty(id, value, true); }