// Debugger.prototype.findScripts can find the innermost script at a given // source location. var g = newGlobal({newCompartment: true}); var dbg = new Debugger(); var gw = dbg.addDebuggee(g);
function script(f) { return gw.makeDebuggeeValue(f).script;
}
// When we're doing 'innermost' queries, we don't have to worry about finding // random eval scripts: we should get exactly one script, for the function // covering that line.
scripts = dbg.findScripts({url:url, line:4, innermost:true});
assertEq(arrayIsOnly(scripts, script(g.f)), true);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.