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.
35 lines
812 B
35 lines
812 B
=proto
|
|
void duk_put_var(duk_context *ctx);
|
|
|
|
=stack
|
|
[ ... varname! val! ] -> [ ... ]
|
|
|
|
=summary
|
|
|
|
<p>Write <code>val</code> to the identifier <code>varname</code>. Possible outcomes:</p>
|
|
<ul>
|
|
<li>If identifier is found and write succeeds: XXX.</li>
|
|
<li>If identifier is found and write fails (e.g. write-protected property): XXX.</li>
|
|
<li>If identifier is not found but can be created: XXX.</li>
|
|
<li>If identifier is not found and cannot be created (e.g. global object is
|
|
non-extensible): XXX.</li>
|
|
<li>If the input stack does not contain enough arguments (or some other internal
|
|
error occurs), throws an error.</li>
|
|
</ul>
|
|
|
|
XXX
|
|
|
|
<p>The identifier write is equivalent to the Ecmascript expression:</p>
|
|
<pre class="ecmascript-code">
|
|
varname = val
|
|
</pre>
|
|
|
|
=example
|
|
XXX
|
|
|
|
=tags
|
|
variable
|
|
omit
|
|
|
|
=introduced
|
|
1.0.0
|
|
|