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.
26 lines
687 B
26 lines
687 B
=proto
|
|
int duk_is_strict_call(duk_context *ctx);
|
|
|
|
=summary
|
|
<p>Check whether the current (Duktape/C) function call is strict or not.
|
|
Returns 1 if the current function call is strict, 0 otherwise. If the
|
|
call stack is empty, i.e. there is no active function call, returns 0.</p>
|
|
|
|
<div class="note">
|
|
All Duktape/C functions are currently strict, so at the monent this function
|
|
always returns 1 when called from inside a Duktape/C function call, and 0 when
|
|
called outside of a Duktape/C call (for a context with an empty call stack).
|
|
</div>
|
|
|
|
=example
|
|
if (duk_is_strict_call(ctx)) {
|
|
printf("strict call\n");
|
|
} else {
|
|
printf("non-strict call\n");
|
|
}
|
|
|
|
=tags
|
|
function
|
|
|
|
=fixme
|
|
Necessary?
|
|
|