Bug 1568143 - Don't use JsTerm reference to evaluate code. r=jdescottes.
JSTerm `execute` function is renamed to `_execute` to emphasize that it's a private function. A `dispatchEvaluateExpression` is added to the WebConsoleWrapper so other panels can use that if they need to. A test helper is added to be able to evaluate without grabbing the jsterm reference, and tests are modified to use the new helper, or the existing `executeAndWaitForMessage`. Differential Revision: https://phabricator.services.mozilla.com/D39024
This commit is contained in:
@@ -344,11 +344,8 @@ class MarkupContextMenu {
|
||||
*/
|
||||
_showDOMProperties() {
|
||||
this.toolbox.openSplitConsole().then(() => {
|
||||
const panel = this.toolbox.getPanel("webconsole");
|
||||
const jsterm = panel.hud.jsterm;
|
||||
|
||||
jsterm.execute("inspect($0)");
|
||||
jsterm.focus();
|
||||
const { hud } = this.toolbox.getPanel("webconsole");
|
||||
hud.ui.wrapper.dispatchEvaluateExpression("inspect($0)");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user