Represents the built-in Symbol object.
Inheritance: ClrStubFunction
示例#1
0
 /// <summary>
 /// Initializes the prototype properties.
 /// </summary>
 /// <param name="obj"> The object to set the properties on. </param>
 /// <param name="constructor"> A reference to the constructor that owns the prototype. </param>
 internal static void InitializePrototypeProperties(ObjectInstance obj, SymbolConstructor constructor)
 {
     var engine = obj.Engine;
     var properties = GetDeclarativeProperties(engine);
     properties.Add(new PropertyNameAndValue("constructor", constructor, PropertyAttributes.NonEnumerable));
     properties.Add(new PropertyNameAndValue(engine.Symbol.ToStringTag, "Symbol", PropertyAttributes.Configurable));
     obj.FastSetProperties(properties);
 }
示例#2
0
        /// <summary>
        /// Initializes the prototype properties.
        /// </summary>
        /// <param name="obj"> The object to set the properties on. </param>
        /// <param name="constructor"> A reference to the constructor that owns the prototype. </param>
        internal static void InitializePrototypeProperties(ObjectInstance obj, SymbolConstructor constructor)
        {
            var engine     = obj.Engine;
            var properties = GetDeclarativeProperties(engine);

            properties.Add(new PropertyNameAndValue("constructor", constructor, PropertyAttributes.NonEnumerable));
            properties.Add(new PropertyNameAndValue(Symbol.ToStringTag, "Symbol", PropertyAttributes.Configurable));
            obj.InitializeProperties(properties);
        }