Method
JavaScriptCoreContextevaluate_with_source_uri
Declaration [src]
JSCValue*
jsc_context_evaluate_with_source_uri (
JSCContext* context,
const char* code,
gssize length,
const char* uri,
guint line_number
)
Description [src]
Evaluate code
in context
using uri
as the source URI. The line_number
is the starting line number
in uri
; the value is one-based so the first line is 1. uri
and line_number
will be shown in exceptions and
they don’t affect the behavior of the script.
Parameters
code
-
Type:
const char*
A JavaScript script to evaluate.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. length
-
Type:
gssize
Length of
code
, or -1 ifcode
is a nul-terminated string. uri
-
Type:
const char*
The source URI.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. line_number
-
Type:
guint
The starting line number.
Return value
Type: JSCValue
A JSCValue
representing the last value generated by the script.
The caller of the method takes ownership of the data, and is responsible for freeing it. |