mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
528 B
25 lines
528 B
=proto
|
|
void duk_eval_file(duk_context *ctx, const char *path);
|
|
|
|
=stack
|
|
[ ... ] -> [ ... result! ]
|
|
|
|
=summary
|
|
<p>Like
|
|
<code><a href="#duk_eval">duk_eval()</a></code>, but the eval input
|
|
is given as a filename. The filename associated with the temporary
|
|
function created for the eval code is <code>path</code> as is.</p>
|
|
|
|
<div include="path-encoding.html" />
|
|
|
|
=example
|
|
duk_eval_file(ctx, "test.js");
|
|
printf("result is: %s\n", duk_safe_to_string(ctx, -1));
|
|
duk_pop(ctx);
|
|
|
|
=tags
|
|
compile
|
|
nonportable
|
|
|
|
=seealso
|
|
duk_eval_file_noresult
|
|
|