/// <summary>
        /// Gets an object's property
        /// </summary>
        /// <remarks>
        /// Requires an active script context.
        /// </remarks>
        /// <param name="source">The JavaScript value</param>
        /// <param name="name">The name of the property</param>
        /// <returns>The value of the property</returns>
        public static IeJsValue GetProperty(this IeJsValue source, string name)
        {
            IeJsPropertyId id          = IeJsPropertyId.FromString(name);
            IeJsValue      resultValue = source.GetProperty(id);

            return(resultValue);
        }
        /// <summary>
        /// Deletes an object's property
        /// </summary>
        /// <remarks>
        /// Requires an active script context.
        /// </remarks>
        /// <param name="source">The JavaScript value</param>
        /// <param name="propertyName">The name of the property</param>
        /// <param name="useStrictRules">The property set should follow strict mode rules</param>
        /// <returns>Whether the property was deleted</returns>
        public static IeJsValue DeleteProperty(this IeJsValue source, string propertyName, bool useStrictRules)
        {
            IeJsPropertyId propertyId  = IeJsPropertyId.FromString(propertyName);
            IeJsValue      resultValue = source.DeleteProperty(propertyId, useStrictRules);

            return(resultValue);
        }
        /// <summary>
        /// Gets a property descriptor for an object's own property
        /// </summary>
        /// <remarks>
        /// Requires an active script context.
        /// </remarks>
        /// <param name="source">The JavaScript value</param>
        /// <param name="propertyName">The name of the property</param>
        /// <returns>The property descriptor</returns>
        public static IeJsValue GetOwnPropertyDescriptor(this IeJsValue source, string propertyName)
        {
            IeJsPropertyId propertyId  = IeJsPropertyId.FromString(propertyName);
            IeJsValue      resultValue = source.GetOwnPropertyDescriptor(propertyId);

            return(resultValue);
        }
        /// <summary>
        /// Determines whether an object has a property
        /// </summary>
        /// <remarks>
        /// Requires an active script context.
        /// </remarks>
        /// <param name="source">The JavaScript value</param>
        /// <param name="propertyName">The name of the property</param>
        /// <returns>Whether the object (or a prototype) has the property</returns>
        public static bool HasProperty(this IeJsValue source, string propertyName)
        {
            IeJsPropertyId propertyId = IeJsPropertyId.FromString(propertyName);
            bool           result     = source.HasProperty(propertyId);

            return(result);
        }
        /// <summary>
        /// Defines a new object's own property from a property descriptor
        /// </summary>
        /// <remarks>
        /// Requires an active script context.
        /// </remarks>
        /// <param name="source">The JavaScript value</param>
        /// <param name="propertyName">The name of the property</param>
        /// <param name="propertyDescriptor">The property descriptor</param>
        /// <returns>Whether the property was defined</returns>
        public static bool DefineProperty(this IeJsValue source, string propertyName, IeJsValue propertyDescriptor)
        {
            IeJsPropertyId propertyId = IeJsPropertyId.FromString(propertyName);
            bool           result     = source.DefineProperty(propertyId, propertyDescriptor);

            return(result);
        }
 internal static extern JsErrorCode JsGetPropertyNameFromId(IeJsPropertyId propertyId, out IntPtr buffer);
 internal static extern JsErrorCode JsDeleteProperty(IeJsValue obj, IeJsPropertyId propertyId, bool useStrictRules, out IeJsValue result);
 internal static extern JsErrorCode JsSetProperty(IeJsValue obj, IeJsPropertyId propertyId, IeJsValue value, bool useStrictRules);
 internal static extern JsErrorCode JsDefineProperty(IeJsValue obj, IeJsPropertyId propertyId, IeJsValue propertyDescriptor, out bool result);
        /// <summary>
        /// Sets an object's property
        /// </summary>
        /// <remarks>
        /// Requires an active script context.
        /// </remarks>
        /// <param name="source">The JavaScript value</param>
        /// <param name="name">The name of the property</param>
        /// <param name="value">The new value of the property</param>
        /// <param name="useStrictRules">The property set should follow strict mode rules</param>
        public static void SetProperty(this IeJsValue source, string name, IeJsValue value, bool useStrictRules)
        {
            IeJsPropertyId id = IeJsPropertyId.FromString(name);

            source.SetProperty(id, value, useStrictRules);
        }
		/// <summary>
		/// Determines whether an object has a property
		/// </summary>
		/// <remarks>
		/// Requires an active script context.
		/// </remarks>
		/// <param name="propertyId">The ID of the property</param>
		/// <returns>Whether the object (or a prototype) has the property</returns>
		public bool HasProperty(IeJsPropertyId propertyId)
		{
			bool hasProperty;
			IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsHasProperty(this, propertyId, out hasProperty));

			return hasProperty;
		}
 internal static extern JsErrorCode JsGetProperty(IeJsValue obj, IeJsPropertyId propertyId, out IeJsValue value);
 internal static extern JsErrorCode JsGetPropertyIdFromName(string name, out IeJsPropertyId propertyId);
 internal static extern JsErrorCode JsGetOwnPropertyDescriptor(IeJsValue obj, IeJsPropertyId propertyId, out IeJsValue propertyDescriptor);
		/// <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(IeJsPropertyId propertyId, IeJsValue propertyDescriptor)
		{
			bool result;
			IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsDefineProperty(this, propertyId, propertyDescriptor, out result));

			return result;
		}
		/// <summary>
		/// Deletes a object's property
		/// </summary>
		/// <remarks>
		/// Requires an active script context.
		/// </remarks>
		/// <param name="propertyId">The ID of the property</param>
		/// <param name="useStrictRules">The property set should follow strict mode rules</param>
		/// <returns>Whether the property was deleted</returns>
		public IeJsValue DeleteProperty(IeJsPropertyId propertyId, bool useStrictRules)
		{
			IeJsValue returnReference;
			IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsDeleteProperty(this, propertyId, useStrictRules, out returnReference));

			return returnReference;
		}
		/// <summary>
		/// Sets a object's property
		/// </summary>
		/// <remarks>
		/// Requires an active script context.
		/// </remarks>
		/// <param name="id">The ID of the property</param>
		/// <param name="value">The new value of the property</param>
		/// <param name="useStrictRules">The property set should follow strict mode rules</param>
		public void SetProperty(IeJsPropertyId id, IeJsValue value, bool useStrictRules)
		{
			IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsSetProperty(this, id, value, useStrictRules));
		}
		/// <summary>
		/// Gets a object's property
		/// </summary>
		/// <remarks>
		/// Requires an active script context.
		/// </remarks>
		/// <param name="id">The ID of the property</param>
		/// <returns>The value of the property</returns>
		public IeJsValue GetProperty(IeJsPropertyId id)
		{
			IeJsValue propertyReference;
			IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsGetProperty(this, id, out propertyReference));

			return propertyReference;
		}
 internal static extern JsErrorCode JsHasProperty(IeJsValue obj, IeJsPropertyId propertyId, out bool hasProperty);
		/// <summary>
		/// Gets a property descriptor for an object's own property
		/// </summary>
		/// <remarks>
		/// Requires an active script context.
		/// </remarks>
		/// <param name="propertyId">The ID of the property</param>
		/// <returns>The property descriptor</returns>
		public IeJsValue GetOwnPropertyDescriptor(IeJsPropertyId propertyId)
		{
			IeJsValue descriptorReference;
			IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsGetOwnPropertyDescriptor(this, propertyId, out descriptorReference));

			return descriptorReference;
		}