Context.evaluateWithSourceUri

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.

class Context
evaluateWithSourceUri
(
string code
,
ptrdiff_t length
,
string uri
,)

Parameters

code string

a JavaScript script to evaluate

length ptrdiff_t

length of @code, or -1 if @code is a nul-terminated string

uri string

the source URI

lineNumber uint

the starting line number

Return Value

Type: Value

a #JSCValue representing the last value generated by the script.

Meta