Represents the built-in javascript Boolean object.
Inheritance: ClrStubFunction
Esempio n. 1
0
 /// <summary>
 /// Creates the Boolean prototype object.
 /// </summary>
 /// <param name="engine"> The script environment. </param>
 /// <param name="constructor"> A reference to the constructor that owns the prototype. </param>
 internal static ObjectInstance CreatePrototype(ScriptEngine engine, BooleanConstructor constructor)
 {
     var result = engine.Object.Construct();
     var properties = GetDeclarativeProperties(engine);
     properties.Add(new PropertyNameAndValue("constructor", constructor, PropertyAttributes.NonEnumerable));
     result.FastSetProperties(properties);
     return result;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates the Boolean prototype object.
        /// </summary>
        /// <param name="engine"> The script environment. </param>
        /// <param name="constructor"> A reference to the constructor that owns the prototype. </param>
        internal static ObjectInstance CreatePrototype(ScriptEngine engine, BooleanConstructor constructor)
        {
            var result     = engine.Object.Construct();
            var properties = GetDeclarativeProperties(engine);

            properties.Add(new PropertyNameAndValue("constructor", constructor, PropertyAttributes.NonEnumerable));
            result.FastSetProperties(properties);
            return(result);
        }