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.
24 lines
456 B
24 lines
456 B
name: duk_require_object
|
|
|
|
proto: |
|
|
void duk_require_object(duk_context *ctx, duk_idx_t idx);
|
|
|
|
stack: |
|
|
[ ... val! ... ]
|
|
|
|
summary: |
|
|
<p>Throw an error if the value at <code>idx</code> is not an object
|
|
or if the index is invalid.</p>
|
|
|
|
<div class="note">
|
|
There is no "get" primitive (<code>duk_get_object()</code>) because such a
|
|
function would be a no-op.
|
|
</div>
|
|
|
|
example: |
|
|
duk_require_object(ctx, -3);
|
|
|
|
tags:
|
|
- stack
|
|
|
|
introduced: 2.2.0
|
|
|