/// <summary> /// Execute the function using the specified V8 context. |object| is the /// receiver ('this' object) of the function. If |object| is empty 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 method is called incorrectly or an /// exception is thrown. /// </summary> public CefV8Value ExecuteFunctionWithContext(CefV8Context context, CefV8Value obj, CefV8Value[] arguments) { var n_arguments = CreateArguments(arguments); cef_v8value_t *n_retval; fixed(cef_v8value_t **n_arguments_ptr = n_arguments) { n_retval = cef_v8value_t.execute_function_with_context( _self, context.ToNative(), obj != null ? obj.ToNative() : null, n_arguments != null ? (UIntPtr)n_arguments.Length : UIntPtr.Zero, n_arguments_ptr ); } return(CefV8Value.FromNativeOrNull(n_retval)); }
/// <summary> /// Returns the entered (bottom) context object in the V8 context stack. /// </summary> public static CefV8Context GetEnteredContext() { return(CefV8Context.FromNative( cef_v8context_t.get_entered_context() )); }
/// <summary> /// Returns the current (top) context object in the V8 context stack. /// </summary> public static CefV8Context GetCurrentContext() { return(CefV8Context.FromNative( cef_v8context_t.get_current_context() )); }
/// <summary> /// Called for global uncaught exceptions in a frame. Execution of this /// callback is disabled by default. To enable set /// CefSettings.uncaught_exception_stack_size > 0. /// </summary> protected virtual void OnUncaughtException(CefBrowser browser, CefFrame frame, CefV8Context context, CefV8Exception exception, CefV8StackTrace stackTrace) { }
/// <summary> /// Called immediately before the V8 context for a frame is released. No /// references to the context should be kept after this method is called. /// </summary> protected virtual void OnContextReleased(CefBrowser browser, CefFrame frame, CefV8Context context) { }