diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2019-07-14 09:12:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-14 09:12:34 -0400 |
commit | 91a27750b3fccaba162ec988d189a57d947776e4 (patch) | |
tree | bda6d2b282c27710e183030d09649c45e1b82be5 /devtools/client/webide/content/logs.js | |
parent | ee33f35b324110857b2854b30dd37936b2090e58 (diff) | |
parent | 197f4cbaa47e5e8b9b1fb578b10046914eb6486e (diff) | |
download | UXP-91a27750b3fccaba162ec988d189a57d947776e4.tar UXP-91a27750b3fccaba162ec988d189a57d947776e4.tar.gz UXP-91a27750b3fccaba162ec988d189a57d947776e4.tar.lz UXP-91a27750b3fccaba162ec988d189a57d947776e4.tar.xz UXP-91a27750b3fccaba162ec988d189a57d947776e4.zip |
Merge pull request #1177 from MoonchildProductions/remove_webide
Remove WebIDE devtools component.
Diffstat (limited to 'devtools/client/webide/content/logs.js')
-rw-r--r-- | devtools/client/webide/content/logs.js | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/devtools/client/webide/content/logs.js b/devtools/client/webide/content/logs.js deleted file mode 100644 index 157d83b67..000000000 --- a/devtools/client/webide/content/logs.js +++ /dev/null @@ -1,70 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -var Cu = Components.utils; -const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {}); -const {AppManager} = require("devtools/client/webide/modules/app-manager"); - -window.addEventListener("load", function onLoad() { - window.removeEventListener("load", onLoad); - - Logs.init(); -}); - -window.addEventListener("unload", function onUnload() { - window.removeEventListener("unload", onUnload); - - Logs.uninit(); -}); - -const Logs = { - init: function () { - this.list = document.getElementById("logs"); - - Logs.onAppManagerUpdate = Logs.onAppManagerUpdate.bind(this); - AppManager.on("app-manager-update", Logs.onAppManagerUpdate); - - document.getElementById("close").onclick = Logs.close.bind(this); - }, - - uninit: function () { - AppManager.off("app-manager-update", Logs.onAppManagerUpdate); - }, - - onAppManagerUpdate: function (event, what, details) { - switch (what) { - case "pre-package": - this.prePackageLog(details); - break; - } - }, - - close: function () { - window.parent.UI.openProject(); - }, - - prePackageLog: function (msg, details) { - if (msg == "start") { - this.clear(); - } else if (msg == "succeed") { - setTimeout(function () { - Logs.close(); - }, 1000); - } else if (msg == "failed") { - this.log(details); - } else { - this.log(msg); - } - }, - - clear: function () { - this.list.innerHTML = ""; - }, - - log: function (msg) { - let line = document.createElement("li"); - line.textContent = msg; - this.list.appendChild(line); - } -}; |