Debugger: Difference between revisions

1,291 bytes added ,  23 March 2011
→‎Properties of the Debug.Object prototype: Add 'call' and 'apply' methods.
(→‎Properties of the Debug.Frame Prototype Object: Add evalWithBindings to Debug.Frame.prototype.)
(→‎Properties of the Debug.Object prototype: Add 'call' and 'apply' methods.)
Line 456: Line 456:
<dt>decompile([<i>pretty</i>])
<dt>decompile([<i>pretty</i>])
<dd>If the referent is a function, return the source code for a JavaScript function definition equivalent to this function in its effect and result, as a string. If the referent is not a function, throw a <code>TypeError</code>. If <i>pretty</i> is present and true, produce indented code with line breaks.
<dd>If the referent is a function, return the source code for a JavaScript function definition equivalent to this function in its effect and result, as a string. If the referent is not a function, throw a <code>TypeError</code>. If <i>pretty</i> is present and true, produce indented code with line breaks.
<dt>call(<i>this</i>, <i>argument</i>, ...)
<dd>If the referent is a function, push a <code>"debugger"</code> frame on the debuggee's stack, call the referent with the given <i>this</i> value and <i>argument</i> values, pop the <code>"debugger"</code> frame, and return a value of the sort passed to an <code>enterFrame</code> completion function describing how the call completed. The <i>this</i> and <i>argument</i> values must be debuggee values. All extant hook functions, breakpoints, watchpoints, and so on remain active during the call. If the referent is not a function, throw a <code>TypeError</code>.
<dt>apply(<i>function</i>, <i>this</i>, <i>arguments</i>)
<dd>If the referent is a function, push a <code>"debugger"</code> frame on the debuggee's stack, call the referent with the given <i>this</i> and argument values in <i>arguments</i>, pop the <code>"debugger"</code> frame, and return a value of the sort passed to an <code>enterFrame</code> completion function describing how the call completed. <i>This</i> must be a debuggee value, and <i>arguments</i> must be an array (in the debugger) of debuggee values. All extant hook functions, breakpoints, watchpoints, and so on remain active during the call. If the referent is not a function, throw a <code>TypeError</code>.


<dt>outerEnvironment()
<dt>outerEnvironment()
Confirmed users
497

edits