/// <summary> /// Returns the value with the specified identifier on success. Returns NULL /// if this method is called incorrectly or an exception is thrown. /// </summary> public CefV8Value GetValue(string key) { fixed(char *key_str = key) { var n_key = new cef_string_t(key_str, key != null ? key.Length : 0); return(CefV8Value.FromNativeOrNull( cef_v8value_t.get_value_bykey(_self, &n_key) )); } }
/// <summary> /// Execute the function using the current V8 context. This method should only /// be called from within the scope of a CefV8Handler or CefV8Accessor /// callback, or in combination with calling Enter() and Exit() on a stored /// CefV8Context reference. |object| is the receiver ('this' object) of the /// function. If |object| is empty 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 method is called incorrectly or an exception is thrown. /// </summary> public CefV8Value ExecuteFunction(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( _self, 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 value with the specified identifier on success. Returns NULL /// if this method is called incorrectly or an exception is thrown. /// </summary> public CefV8Value GetValue(int index) { return(CefV8Value.FromNativeOrNull( cef_v8value_t.get_value_byindex(_self, index) )); }