OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 return; | 207 return; |
208 | 208 |
209 WebInspector.console.showPromise().then(reportUponEvaluation); | 209 WebInspector.console.showPromise().then(reportUponEvaluation); |
210 function reportUponEvaluation() | 210 function reportUponEvaluation() |
211 { | 211 { |
212 target.consoleModel.dispatchEventToListeners(WebInspector.ConsoleMod
el.Events.CommandEvaluated, {result: result, wasThrown: wasThrown, text: text, c
ommandMessage: commandMessage, exceptionDetails: exceptionDetails}); | 212 target.consoleModel.dispatchEventToListeners(WebInspector.ConsoleMod
el.Events.CommandEvaluated, {result: result, wasThrown: wasThrown, text: text, c
ommandMessage: commandMessage, exceptionDetails: exceptionDetails}); |
213 } | 213 } |
214 } | 214 } |
215 if (/^\s*\{/.test(text) && /\}\s*$/.test(text)) | 215 if (/^\s*\{/.test(text) && /\}\s*$/.test(text)) |
216 text = '(' + text + ')'; | 216 text = '(' + text + ')'; |
217 executionContext.evaluate(text, "console", !!useCommandLineAPI, false, false
, true, printResult); | 217 executionContext.evaluate(text, "console", !!useCommandLineAPI, false, false
, true, true, printResult); |
218 | 218 |
219 WebInspector.userMetrics.actionTaken(WebInspector.UserMetrics.Action.Console
Evaluated); | 219 WebInspector.userMetrics.actionTaken(WebInspector.UserMetrics.Action.Console
Evaluated); |
220 } | 220 } |
221 | 221 |
222 WebInspector.ConsoleModel.clearConsole = function() | 222 WebInspector.ConsoleModel.clearConsole = function() |
223 { | 223 { |
224 var targets = WebInspector.targetManager.targets(); | 224 var targets = WebInspector.targetManager.targets(); |
225 for (var i = 0; i < targets.length; ++i) | 225 for (var i = 0; i < targets.length; ++i) |
226 targets[i].consoleModel.requestClearMessages(); | 226 targets[i].consoleModel.requestClearMessages(); |
227 } | 227 } |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, event.data); | 603 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, event.data); |
604 }, | 604 }, |
605 | 605 |
606 __proto__: WebInspector.Object.prototype | 606 __proto__: WebInspector.Object.prototype |
607 } | 607 } |
608 | 608 |
609 /** | 609 /** |
610 * @type {!WebInspector.MultitargetConsoleModel} | 610 * @type {!WebInspector.MultitargetConsoleModel} |
611 */ | 611 */ |
612 WebInspector.multitargetConsoleModel; | 612 WebInspector.multitargetConsoleModel; |
OLD | NEW |