Bug 1318796 - Open the appropriate tool when clicking on a location in the new console; r=jdescottes
We were always opening the debugger when clicking on the location link, which could be wrong since we can have CSS warnings, or logs coming from Scratchpad. So we add the function to open in StyleEditor and Scratchpad, and copy some mochitests that where testing the interaction with those links. MozReview-Commit-ID: 73mQNfy199m
This commit is contained in:
@@ -44,7 +44,21 @@ NewConsoleOutputWrapper.prototype = {
|
||||
}]));
|
||||
},
|
||||
hudProxyClient: this.jsterm.hud.proxy.client,
|
||||
onViewSourceInDebugger: frame => this.toolbox.viewSourceInDebugger.call(
|
||||
onViewSourceInDebugger: frame => {
|
||||
this.toolbox.viewSourceInDebugger.call(
|
||||
this.toolbox,
|
||||
frame.url,
|
||||
frame.line
|
||||
).then(() =>
|
||||
this.jsterm.hud.emit("source-in-debugger-opened")
|
||||
);
|
||||
},
|
||||
onViewSourceInScratchpad: frame => this.toolbox.viewSourceInScratchpad.call(
|
||||
this.toolbox,
|
||||
frame.url,
|
||||
frame.line
|
||||
),
|
||||
onViewSourceInStyleEditor: frame => this.toolbox.viewSourceInStyleEditor.call(
|
||||
this.toolbox,
|
||||
frame.url,
|
||||
frame.line
|
||||
|
||||
Reference in New Issue
Block a user