1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
// onNewGlobalObject handlers fire, until they are removed. var dbg = new Debugger; var log; log = ''; newGlobal(); assertEq(log, ''); dbg.onNewGlobalObject = function (global) { log += 'n'; assertEq(global.seen, undefined); global.seen = true; }; log = ''; newGlobal(); assertEq(log, 'n'); log = ''; dbg.onNewGlobalObject = undefined; newGlobal(); assertEq(log, '');