Bug 1569190 - Remove JSTerm outputNode getter. r=jdescottes.

The reference isn't used within the component itself,
and is available in the webConsoleUI.
Callsites are updated.

Differential Revision: https://phabricator.services.mozilla.com/D39505

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicolas Chevobbe 2019-07-26 16:39:08 +00:00
parent 047fde9d4e
commit 46b7e6f5ac
4 changed files with 3 additions and 11 deletions

View File

@ -567,14 +567,6 @@ class JSTerm extends Component {
}
}
/**
* Getter for the element that holds the messages we display.
* @type Element
*/
get outputNode() {
return this.webConsoleUI.outputNode;
}
focus() {
if (this.editor) {
this.editor.focus();

View File

@ -24,7 +24,7 @@ async function performTests() {
await onMessage;
const onCleared = waitFor(
() => hud.jsterm.outputNode.querySelector(".message") === null
() => hud.ui.outputNode.querySelector(".message") === null
);
hud.jsterm.execute("clear()");
await onCleared;

View File

@ -32,7 +32,7 @@ async function performTests() {
await jsterm.execute("help");
await jsterm.execute("?");
const messages = Array.from(jsterm.outputNode.querySelectorAll(".message"));
const messages = Array.from(hud.ui.outputNode.querySelectorAll(".message"));
ok(
messages.every(msg => msg.classList.contains("command")),
"There is no results shown for the help commands"

View File

@ -674,7 +674,7 @@ function getInputCompletionValue(hud) {
*/
function isInputFocused(hud) {
const { jsterm } = hud;
const document = jsterm.outputNode.ownerDocument;
const document = hud.ui.outputNode.ownerDocument;
const documentIsFocused = document.hasFocus();
if (jsterm.inputNode) {