Confirmed users
497
edits
([master c06c44c] Clarify Debugger.Object::evalInGlobalWithBindings.) |
(0bb3b79 In Debugger.Environment, change setVariable not to create new bindings. Add deleteVariable.) |
||
| Line 846: | Line 846: | ||
<dt>setVariable(<i>name</i>, <i>value</i>) | <dt>setVariable(<i>name</i>, <i>value</i>) | ||
<dd>Store <i>value</i> as the value of the variable bound to <i>name</i> in this environment | <dd>Store <i>value</i> as the value of the variable bound to <i>name</i> in this environment. <i>Name</i> must be a string that is a valid ECMAScript identifier name; <i>value</i> must be a debuggee value. | ||
If this | If this environment binds no variable named <i>name</i>, throw a <code>ReferenceError</code>. | ||
This is not an [[#Invocation_Functions_and_.22debugger.22_Frames|invocation function]]; if this call would cause debuggee code to run, this call throws a [[#The_Debugger.DebuggeeWouldRun_Exception|<code>Debugger.DebuggeeWouldRun</code>]] exception. | This is not an [[#Invocation_Functions_and_.22debugger.22_Frames|invocation function]]; if this call would cause debuggee code to run, this call throws a [[#The_Debugger.DebuggeeWouldRun_Exception|<code>Debugger.DebuggeeWouldRun</code>]] exception. | ||
| Line 858: | Line 858: | ||
writing code that operates properly on descriptors for either kind may be difficult.)</i> | writing code that operates properly on descriptors for either kind may be difficult.)</i> | ||
If | If this environment binds no variable named <i>name</i>, throw a <code>ReferenceError</code>. | ||
<dt>defineVariable(<i>name</i>, <i>descriptor</i>) | <dt>defineVariable(<i>name</i>, <i>descriptor</i>) | ||
| Line 864: | Line 864: | ||
If implementation restrictions prevent SpiderMonkey from creating or reconfiguring the variable as requested, this call throws an <code>Error</code> exception. | If implementation restrictions prevent SpiderMonkey from creating or reconfiguring the variable as requested, this call throws an <code>Error</code> exception. | ||
<dt>deleteVariable(<i>name</i>) | |||
<dd>Delete this environment's binding for <i>name</i>. | |||
If this environment binds no variable named <i>name</i>, throw a <code>ReferenceError</code>. | |||
If implementation restrictions prevent SpiderMonkey from deleting the variable as requested, this call throws an <code>Error</code> exception. | |||
<dt>find(<i>name</i>) | <dt>find(<i>name</i>) | ||