Bug 1346797 - Fix calendar eslint issues - Fix mozilla/avoid-removeChild issues. r=MakeMyDay
authoreslint <eslint@bugzilla.kewis.ch>
Sun, 30 Jul 2017 13:22:27 +0200
changeset 22299 b97e6e08645d15f892d3a30341c9d19b6cc2b3f3
parent 22298 69ed6b20f6f2955a848a1cc750762834b857c482
child 22300 1ab10b6c3b56a2ba0f39021d923db1ef21b0761e
push id13598
push usermozilla@jorgk.com
push dateSun, 08 Oct 2017 20:54:24 +0000
treeherdercomm-central@86066f04ca11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMakeMyDay
bugs1346797
Bug 1346797 - Fix calendar eslint issues - Fix mozilla/avoid-removeChild issues. r=MakeMyDay MozReview-Commit-ID: KghdaOwvfVg
calendar/lightning/modules/ltnInvitationUtils.jsm
--- a/calendar/lightning/modules/ltnInvitationUtils.jsm
+++ b/calendar/lightning/modules/ltnInvitationUtils.jsm
@@ -292,17 +292,17 @@ ltn.invitation = {
          * @param {Node}    aToNode text node to change
          * @param {String}  aType   use 'newline' for the same, 'added' or 'removed' for decoration
          * @param {String}  aText   [optional]
          * @param {Boolean} aClear  [optional] for consecutive changes on the same node, set to false
          */
         function _content2Child(aToNode, aType, aText = "", aClear = true) {
             let nodeDoc = aToNode.ownerDocument;
             if (aClear && aToNode.hasChildNodes()) {
-                aToNode.removeChild(aToNode.firstChild);
+                aToNode.firstChild.remove();
             }
             let n = nodeDoc.createElement(aType.toLowerCase() == "newline" ? "br" : "span");
             switch (aType) {
                 case "added":
                 case "modified":
                 case "removed":
                     n.className = aType;
                     if (Preferences.get("calendar.view.useSystemColors", false)) {