Issue #1138 - Part 1: refactor the JSON Viewer stream converter

Mozilla Bug 1367894
This commit is contained in:
yami 2019-07-30 15:27:59 +02:00 committed by Roy Tam
commit 8f1e1f40c7
4 changed files with 153 additions and 194 deletions

View file

@ -12,7 +12,6 @@ define(function (require, exports, module) {
const { MainTabbedArea } = createFactories(require("./components/main-tabbed-area"));
const json = document.getElementById("json");
const headers = document.getElementById("headers");
let jsonData;
@ -27,13 +26,12 @@ define(function (require, exports, module) {
jsonText: json.textContent,
jsonPretty: null,
json: jsonData,
headers: JSON.parse(headers.textContent),
headers: window.headers,
tabActive: 0,
prettified: false
};
json.remove();
headers.remove();
/**
* Application actions/commands. This list implements all commands