638
edits
(→Function Properties of the JSInspector.Frame Prototype Object: Have evalWithBindings include accessor properties of bindings, too.) |
(→Function Properties of the JSInspector.Frame Prototype Object: evalWithBindings takes only own properties of ''bindings'') |
||
| Line 327: | Line 327: | ||
<dt>evalWithBindings(<i>code</i>, <i>bindings</i>) | <dt>evalWithBindings(<i>code</i>, <i>bindings</i>) | ||
<dd>Like <code>eval</code>, but evaluate <i>code</i> in the scope of this frame, extended with bindings from the object <i>bindings</i>. For each enumerable property of <i>bindings</i> named <i>name</i> whose value is <i>value</i>, include a variable in the environment in which <i>code</i> is evaluated named <i>name</i>, whose value is <i>value</i>. Each <i>value</i> must be a debuggee value. (This is not like a <code>with</code> statement: <i>code</i> may access, assign to, and delete the introduced bindings without having any effect on the <i>bindings</i> object.) | <dd>Like <code>eval</code>, but evaluate <i>code</i> in the scope of this frame, extended with bindings from the object <i>bindings</i>. For each own enumerable property of <i>bindings</i> named <i>name</i> whose value is <i>value</i>, include a variable in the environment in which <i>code</i> is evaluated named <i>name</i>, whose value is <i>value</i>. Each <i>value</i> must be a debuggee value. (This is not like a <code>with</code> statement: <i>code</i> may access, assign to, and delete the introduced bindings without having any effect on the <i>bindings</i> object.) | ||
This method allows debugger code to introduce temporary bindings that are visible to the given debuggee code and which refer to debugger-held debuggee values, and do so without mutating any existing debuggee scope. | This method allows debugger code to introduce temporary bindings that are visible to the given debuggee code and which refer to debugger-held debuggee values, and do so without mutating any existing debuggee scope. | ||
edits