Bug 1444853 - Setting permissionsText in the site permissions dialog can be simplified r?prathiksha draft
authoraccakks <aakanksha.jain8@gmail.com>
Wed, 14 Mar 2018 20:27:15 +0530
changeset 767867 ecf2afac33f16cb84ff950ca126cbcdfdad1e433
parent 765547 415e9b18ca2a1532086d5e2d5d21343cd004b5fd
push id102719
push userbmo:aakanksha.jain8@gmail.com
push dateThu, 15 Mar 2018 07:33:26 +0000
reviewersprathiksha
bugs1444853
milestone60.0a1
Bug 1444853 - Setting permissionsText in the site permissions dialog can be simplified r?prathiksha MozReview-Commit-ID: 1pZiOJfNMfV
browser/components/preferences/sitePermissions.js
--- a/browser/components/preferences/sitePermissions.js
+++ b/browser/components/preferences/sitePermissions.js
@@ -46,19 +46,19 @@ var gSitePermissionsManager = {
     this._type = params.permissionType;
     this._list = document.getElementById("permissionsBox");
     this._removeButton = document.getElementById("removePermission");
     this._removeAllButton = document.getElementById("removeAllPermissions");
     this._searchBox = document.getElementById("searchBox");
     this._checkbox = document.getElementById("permissionsDisableCheckbox");
 
     let permissionsText = document.getElementById("permissionsText");
-    while (permissionsText.hasChildNodes())
-      permissionsText.firstChild.remove();
-    permissionsText.appendChild(document.createTextNode(params.introText));
+    permissionsText.textContent = params.introText;
+
+
 
     this._checkbox.setAttribute("label", params.disablePermissionsLabel);
     let permissionsDisableDescription = document.getElementById("permissionsDisableDescription");
     permissionsDisableDescription.appendChild(document.createTextNode(params.disablePermissionsDescription));
 
     document.title = params.windowTitle;
 
     // Initialize the checkbox state.