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
620 B

name: duk_require_callable
proto: |
void duk_require_callable(duk_context *ctx, duk_idx_t idx);
stack: |
[ ... val! ... ]
summary: |
<p>Throw an error if the value at <code>idx</code> is not callable
or if the index is invalid.</p>
<div class="note">
There is no "get" primitive (<code>duk_get_callable()</code>) because there's
no useful C return value for an arbitrary callable value. At the moment this
call is equivalent to calling <code><a href="#duk_require_function">duk_require_function()</a></code>.
</div>
example: |
duk_require_callable(ctx, -3);
tags:
- stack
introduced: 1.4.0