# Interface ICefv8Value

Description
Hierarchy
Methods

## Unit

uCEFInterfaces

## Declaration

`type ICefv8Value = interface(ICefBaseRefCounted)`

## Description

Interface representing a V8 value handle. V8 handles can only be accessed from the thread on which they are created. Valid threads for creating a V8 handle include the render process main thread (TID_RENDERER) and WebWorker threads. A task runner for posting tasks on the associated thread can be retrieved via the ICefv8context.GetTaskRunner() function.

UNKNOWN

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_v8_capi.h">CEF source file: /include/capi/cef_v8_capi.h (cef_v8_value_t))

## Hierarchy

- IInterface
- ICefBaseRefCounted
- ICefv8Value

## Overview

### Methods

Public | `function IsValid: Boolean;`
Public | `function IsUndefined: Boolean;`
Public | `function IsNull: Boolean;`
Public | `function IsBool: Boolean;`
Public | `function IsInt: Boolean;`
Public | `function IsUInt: Boolean;`
Public | `function IsDouble: Boolean;`
Public | `function IsDate: Boolean;`
Public | `function IsString: Boolean;`
Public | `function IsObject: Boolean;`
Public | `function IsArray: Boolean;`
Public | `function IsArrayBuffer: Boolean;`
Public | `function IsFunction: Boolean;`
Public | `function IsPromise: Boolean;`
Public | `function IsSame(const that: ICefv8Value): Boolean;`
Public | `function GetBoolValue: Boolean;`
Public | `function GetIntValue: Integer;`
Public | `function GetUIntValue: Cardinal;`
Public | `function GetDoubleValue: Double;`
Public | `function GetDateValue: TDateTime;`
Public | `function GetStringValue: ustring;`
Public | `function IsUserCreated: Boolean;`
Public | `function HasException: Boolean;`
Public | `function GetException: ICefV8Exception;`
Public | `function ClearException: Boolean;`
Public | `function WillRethrowExceptions: Boolean;`
Public | `function SetRethrowExceptions(rethrow: Boolean): Boolean;`
Public | `function HasValueByKey(const key: ustring): Boolean;`
Public | `function HasValueByIndex(index: Integer): Boolean;`
Public | `function DeleteValueByKey(const key: ustring): Boolean;`
Public | `function DeleteValueByIndex(index: Integer): Boolean;`
Public | `function GetValueByKey(const key: ustring): ICefv8Value;`
Public | `function GetValueByIndex(index: Integer): ICefv8Value;`
Public | `function SetValueByKey(const key: ustring; const value: ICefv8Value; attribute: TCefV8PropertyAttributes): Boolean;`
Public | `function SetValueByIndex(index: Integer; const value: ICefv8Value): Boolean;`
Public | `function SetValueByAccessor(const key: ustring; attribute: TCefV8PropertyAttributes): Boolean;`
Public | `function GetKeys(const keys: TStrings): Integer;`
Public | `function SetUserData(const data: ICefCustomUserData): Boolean;`
Public | `function GetUserData: ICefCustomUserData;`
Public | `function GetExternallyAllocatedMemory: Integer;`
Public | `function AdjustExternallyAllocatedMemory(changeInBytes: Integer): Integer;`
Public | `function GetArrayLength: Integer;`
Public | `function GetArrayBufferReleaseCallback: ICefv8ArrayBufferReleaseCallback;`
Public | `function NeuterArrayBuffer: boolean;`
Public | `function GetArrayBufferByteLength: NativeUInt;`
Public | `function GetArrayBufferData: Pointer;`
Public | `function GetFunctionName: ustring;`
Public | `function GetFunctionHandler: ICefv8Handler;`
Public | `function ExecuteFunction(const obj: ICefv8Value; const arguments: TCefv8ValueArray): ICefv8Value;`
Public | `function ExecuteFunctionWithContext(const context: ICefv8Context; const obj: ICefv8Value; const arguments: TCefv8ValueArray): ICefv8Value;`
Public | `function ResolvePromise(const arg: ICefv8Value): boolean;`
Public | `function RejectPromise(const errorMsg: ustring): boolean;`

## Description

### Methods

Public | `function IsValid: Boolean;`
Returns true (1) if the underlying handle is valid and it can be accessed on the current thread. Do not call any other functions if this function returns false (0). ###### Attributes GUID['{52319B8D-75A8-422C-BD4B-16FA08CC7F42}']

Public | `function IsUndefined: Boolean;`
True if the value type is undefined.

Public | `function IsNull: Boolean;`
True if the value type is null.

Public | `function IsBool: Boolean;`
True if the value type is bool.

Public | `function IsInt: Boolean;`
True if the value type is int.

Public | `function IsUInt: Boolean;`
True if the value type is unsigned int.

Public | `function IsDouble: Boolean;`
True if the value type is double.

Public | `function IsDate: Boolean;`
True if the value type is Date.

Public | `function IsString: Boolean;`
True if the value type is string.

Public | `function IsObject: Boolean;`
True if the value type is object.

Public | `function IsArray: Boolean;`
True if the value type is array.

Public | `function IsArrayBuffer: Boolean;`
True if the value type is an ArrayBuffer.

Public | `function IsFunction: Boolean;`
True if the value type is function.

Public | `function IsPromise: Boolean;`
True if the value type is a Promise.

Public | `function IsSame(const that: ICefv8Value): Boolean;`
Returns true (1) if this object is pointing to the same handle as |that| object.

Public | `function GetBoolValue: Boolean;`
Return a bool value.

Public | `function GetIntValue: Integer;`
Return an int value.

Public | `function GetUIntValue: Cardinal;`
Return an unsigned int value.

Public | `function GetDoubleValue: Double;`
Return a double value.

Public | `function GetDateValue: TDateTime;`
Return a Date value.

Public | `function GetStringValue: ustring;`
Return a string value.

Public | `function IsUserCreated: Boolean;`
Returns true (1) if this is a user created object.

Public | `function HasException: Boolean;`
Returns true (1) if the last function call resulted in an exception. This attribute exists only in the scope of the current CEF value object.

Public | `function GetException: ICefV8Exception;`
Returns the exception resulting from the last function call. This attribute exists only in the scope of the current CEF value object.

Public | `function ClearException: Boolean;`
Clears the last exception and returns true (1) on success.

Public | `function WillRethrowExceptions: Boolean;`
Returns true (1) if this object will re-throw future exceptions. This attribute exists only in the scope of the current CEF value object.

Public | `function SetRethrowExceptions(rethrow: Boolean): Boolean;`
Set whether this object will re-throw future exceptions. By default exceptions are not re-thrown. If a exception is re-thrown the current context should not be accessed again until after the exception has been caught and not re-thrown. Returns true (1) on success. This attribute exists only in the scope of the current CEF value object.

Public | `function HasValueByKey(const key: ustring): Boolean;`
Returns true (1) if the object has a value with the specified identifier.

Public | `function HasValueByIndex(index: Integer): Boolean;`
Returns true (1) if the object has a value with the specified identifier.

Public | `function DeleteValueByKey(const key: ustring): Boolean;`
Deletes the value with the specified identifier and returns true (1) on success. Returns false (0) if this function is called incorrectly or an exception is thrown. For read-only and don't-delete values this function will return true (1) even though deletion failed.

Public | `function DeleteValueByIndex(index: Integer): Boolean;`
Deletes the value with the specified identifier and returns true (1) on success. Returns false (0) if this function is called incorrectly, deletion fails or an exception is thrown. For read-only and don't-delete values this function will return true (1) even though deletion failed.

Public | `function GetValueByKey(const key: ustring): ICefv8Value;`
Returns the value with the specified identifier on success. Returns NULL if this function is called incorrectly or an exception is thrown.

Public | `function GetValueByIndex(index: Integer): ICefv8Value;`
Returns the value with the specified identifier on success. Returns NULL if this function is called incorrectly or an exception is thrown.

Public | `function SetValueByKey(const key: ustring; const value: ICefv8Value; attribute: TCefV8PropertyAttributes): Boolean;`
Associates a value with the specified identifier and returns true (1) on success. Returns false (0) if this function is called incorrectly or an exception is thrown. For read-only values this function will return true (1) even though assignment failed.

Public | `function SetValueByIndex(index: Integer; const value: ICefv8Value): Boolean;`
Associates a value with the specified identifier and returns true (1) on success. Returns false (0) if this function is called incorrectly or an exception is thrown. For read-only values this function will return true (1) even though assignment failed.

Public | `function SetValueByAccessor(const key: ustring; attribute: TCefV8PropertyAttributes): Boolean;`
Registers an identifier and returns true (1) on success. Access to the identifier will be forwarded to the ICefV8Accessor instance passed to cef_v8_value_create_object(). Returns false (0) if this function is called incorrectly or an exception is thrown. For read-only values this function will return true (1) even though assignment failed.

Public | `function GetKeys(const keys: TStrings): Integer;`
Read the keys for the object's values into the specified vector. Integer- based keys will also be returned as strings.

Public | `function SetUserData(const data: ICefCustomUserData): Boolean;`
Sets the user data for this object and returns true (1) on success. Returns false (0) if this function is called incorrectly. This function can only be called on user created objects.

Public | `function GetUserData: ICefCustomUserData;`
Returns the user data, if any, assigned to this object.

Public | `function GetExternallyAllocatedMemory: Integer;`
Returns the amount of externally allocated memory registered for the object.

Public | `function AdjustExternallyAllocatedMemory(changeInBytes: Integer): Integer;`
Adjusts the amount of registered external memory for the object. Used to give V8 an indication of the amount of externally allocated memory that is kept alive by JavaScript objects. V8 uses this information to decide when to perform global garbage collection. Each ICefv8Value tracks the amount of external memory associated with it and automatically decreases the global total by the appropriate amount on its destruction. |change_in_bytes| specifies the number of bytes to adjust by. This function returns the number of bytes associated with the object after the adjustment. This function can only be called on user created objects.

Public | `function GetArrayLength: Integer;`
Returns the number of elements in the array.

Public | `function GetArrayBufferReleaseCallback: ICefv8ArrayBufferReleaseCallback;`
Returns the ReleaseCallback object associated with the ArrayBuffer or NULL if the ArrayBuffer was not created with CreateArrayBuffer.

Public | `function NeuterArrayBuffer: boolean;`
Prevent the ArrayBuffer from using it's memory block by setting the length to zero. This operation cannot be undone. If the ArrayBuffer was created with CreateArrayBuffer then ICefv8ArrayBufferReleaseCallback.ReleaseBuffer will be called to release the underlying buffer.

Public | `function GetArrayBufferByteLength: NativeUInt;`
Returns the length (in bytes) of the ArrayBuffer.

Public | `function GetArrayBufferData: Pointer;`
Returns a pointer to the beginning of the memory block for this ArrayBuffer backing store. The returned pointer is valid as long as the ICefv8value is alive.

Public | `function GetFunctionName: ustring;`
Returns the function name.

Public | `function GetFunctionHandler: ICefv8Handler;`
Returns the function handler or NULL if not a CEF-created function.

Public | `function ExecuteFunction(const obj: ICefv8Value; const arguments: TCefv8ValueArray): ICefv8Value;`
Execute the function using the current V8 context. This function should only be called from within the scope of a ICefv8Handler or ICefV8Accessor callback, or in combination with calling enter() and exit() on a stored ICefv8Context reference. |object| is the receiver ('this' object) of the function. If |object| is NULL the current context's global object will be used. |arguments| is the list of arguments that will be passed to the function. Returns the function return value on success. Returns NULL if this function is called incorrectly or an exception is thrown.

Public | `function ExecuteFunctionWithContext(const context: ICefv8Context; const obj: ICefv8Value; const arguments: TCefv8ValueArray): ICefv8Value;`
Execute the function using the specified V8 context. |object| is the receiver ('this' object) of the function. If |object| is NULL the specified context's global object will be used. |arguments| is the list of arguments that will be passed to the function. Returns the function return value on success. Returns NULL if this function is called incorrectly or an exception is thrown.

Public | `function ResolvePromise(const arg: ICefv8Value): boolean;`
Resolve the Promise using the current V8 context. This function should only be called from within the scope of a ICefv8Handler or ICefV8Accessor callback, or in combination with calling enter() and exit() on a stored ICefv8Context reference. |arg| is the argument passed to the resolved promise. Returns true (1) on success. Returns false (0) if this function is called incorrectly or an exception is thrown.

Public | `function RejectPromise(const errorMsg: ustring): boolean;`
Reject the Promise using the current V8 context. This function should only be called from within the scope of a ICefv8Handler or ICefV8Accessor callback, or in combination with calling enter() and exit() on a stored ICefv8Context reference. Returns true (1) on success. Returns false (0) if this function is called incorrectly or an exception is thrown.

Generated by PasDoc 1.0.4.