From b2314b1ee9ba5d32123132ad0002e90aca821c29 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sun, 13 Aug 2017 23:48:38 +0200 Subject: Fix eslint warnings in about:webrtc. --- toolkit/content/aboutwebrtc/aboutWebrtc.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/toolkit/content/aboutwebrtc/aboutWebrtc.js b/toolkit/content/aboutwebrtc/aboutWebrtc.js index 5c366eeb5..f494c7b4d 100644 --- a/toolkit/content/aboutwebrtc/aboutWebrtc.js +++ b/toolkit/content/aboutwebrtc/aboutWebrtc.js @@ -141,11 +141,13 @@ Control.prototype = { update: function() { this.ctrl.textContent = this._label; + this.msg.textContent = ""; if (this._message) { - this.msg.innerHTML = - `${this._messageHeader}: ${this._message}`; - } else { - this.msg.innerHTML = null; + this.msg.appendChild(Object.assign(document.createElement("span"), { + className: "info-label", + textContent: `${this._messageHeader}: `, + })); + this.msg.appendChild(document.createTextNode(this._message)); } }, @@ -308,7 +310,7 @@ var AboutWebRTC = { msg.textContent = getString("cannot_retrieve_log"); parent.appendChild(msg); msg = document.createElement("p"); - msg.innerHTML = `${data.error.name}: ${data.error.message}`; + msg.textContent = `${data.error.name}: ${data.error.message}`; parent.appendChild(msg); return; } -- cgit v1.2.3