The code example in the documentation for webkit_web_view_run_javascript_finish () has a useful idiom in it:
exception = jsc_context_get_exception (jsc_value_get_context (value));
if (exception)
g_warning ("Error running javascript: %s", jsc_exception_get_message (exception));
else
g_print ("Script result: %s\n", str_value);
g_free (str_value);
Exposing JS error messages can be useful in debugging bigger things, so we should probably use jsc_context_get_exception in javascript-evaluation-complete callback. To do so:
How does that sound?
EDIT: Unmatched parentheses O_o
The code example in the documentation for
webkit_web_view_run_javascript_finish ()has a useful idiom in it:Exposing JS error messages can be useful in debugging bigger things, so we should probably use
jsc_context_get_exceptioninjavascript-evaluation-completecallback. To do so:jsc_context_get_exception.jsc_exception_get_message.jsc_value_get_context.JSCExceptionfor better error reporting.(webkit-javascript-result-get-global-context js-result)injavascript-evaluation-complete.How does that sound?
EDIT: Unmatched parentheses O_o