Represents a basic JavaScript object. This class wraps V8 functionality for operations required on any native V8 object (including managed ones).

This class implements 'DynamicObject' to make setting properties a bit easier.

Наследование: IHandleBased, IV8Object, IV8NativeObject, IDynamicMetaObjectProvider, IFinalizable
Пример #1
0
 /// <summary>
 /// (Exists only to support the 'IV8NativeInterface' interface and should not be called directly - call 'Initialize(isConstructCall, args)' instead.)
 /// </summary>
 public void Initialize(V8NativeObject owner, bool isConstructCall, params InternalHandle[] args)
 {
     if (!IsInitilized)
     {
         Initialize(isConstructCall, args);
     }
 }
Пример #2
0
        /// <summary>
        /// Calls the V8 'SetAccessor()' function on the underlying native 'v8::ObjectTenplate' instance to create a property that is controlled by "getter" and "setter" callbacks.
        /// <para>Note: This is template related, which means all objects created from this template will be affected by these special properties.</para>
        /// </summary>
        public void SetAccessor(string name,
                                GetterAccessor getter, SetterAccessor setter,
                                V8PropertyAttributes attributes = V8PropertyAttributes.None, V8AccessControl access = V8AccessControl.Default)
        {
            attributes = V8NativeObject._CreateAccessorProxies(Engine, name, getter, setter, attributes, access, ref _Getter, ref _Setter);

            Getter = getter;
            Setter = setter;

            V8NetProxy.SetObjectTemplateAccessor(_NativeObjectTemplateProxy, -1, name, _Getter, _Setter, access, attributes);
        }
Пример #3
0
 /// <summary>
 /// (Exists only to support the 'IV8NativeInterface' interface and should not be called directly - call 'Initialize(isConstructCall, args)' instead.)
 /// </summary>
 public void Initialize(V8NativeObject owner, bool isConstructCall, params InternalHandle[] args)
 {
     if (!IsInitilized)
         Initialize(isConstructCall, args);
 }