Interface ICefv8Context

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type ICefv8Context = interface(ICefBaseRefCounted)

Description

Interface representing a V8 context 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_v8context_t))

Hierarchy

Overview

Methods

Public function GetTaskRunner: ICefTaskRunner;
Public function IsValid: Boolean;
Public function GetBrowser: ICefBrowser;
Public function GetFrame: ICefFrame;
Public function GetGlobal: ICefv8Value;
Public function Enter: Boolean;
Public function Exit: Boolean;
Public function IsSame(const that: ICefv8Context): Boolean;
Public function Eval(const code: ustring; const script_url: ustring; start_line: integer; var retval: ICefv8Value; var exception: ICefV8Exception): Boolean;

Properties

Public property Browser : ICefBrowser read GetBrowser;
Public property Frame : ICefFrame read GetFrame;
Public property Global : ICefv8Value read GetGlobal;

Description

Methods

Public function GetTaskRunner: ICefTaskRunner;

Returns the task runner associated with this context. V8 handles can only be accessed from the thread on which they are created. This function can be called on any render process thread.

Attributes
GUID['{2295A11A-8773-41F2-AD42-308C215062D9}']
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).

Public function GetBrowser: ICefBrowser;

Returns the browser for this context. This function will return an NULL reference for WebWorker contexts.

Public function GetFrame: ICefFrame;

Returns the frame for this context. This function will return an NULL reference for WebWorker contexts.

Public function GetGlobal: ICefv8Value;

Returns the global object for this context. The context must be entered before calling this function.

Public function Enter: Boolean;

Enter this context. A context must be explicitly entered before creating a V8 Object, Array, Function or Date asynchronously. exit() must be called the same number of times as enter() before releasing this context. V8 objects belong to the context in which they are created. Returns true (1) if the scope was entered successfully.

Public function Exit: Boolean;

Exit this context. Call this function only after calling enter(). Returns true (1) if the scope was exited successfully.

Public function IsSame(const that: ICefv8Context): Boolean;

Returns true (1) if this object is pointing to the same handle as |that| object.

Public function Eval(const code: ustring; const script_url: ustring; start_line: integer; var retval: ICefv8Value; var exception: ICefV8Exception): Boolean;

Execute a string of JavaScript code in this V8 context. The |script_url| parameter is the URL where the script in question can be found, if any. The |start_line| parameter is the base line number to use for error reporting. On success |retval| will be set to the return value, if any, and the function will return true (1). On failure |exception| will be set to the exception, if any, and the function will return false (0).

Properties

Public property Browser : ICefBrowser read GetBrowser;

Returns the browser for this context. This function will return an NULL reference for WebWorker contexts.

Public property Frame : ICefFrame read GetFrame;

Returns the frame for this context. This function will return an NULL reference for WebWorker contexts.

Public property Global : ICefv8Value read GetGlobal;

Returns the global object for this context. The context must be entered before calling this function.


Generated by PasDoc 0.16.0-snapshot.