From 3a208099431f34a0a731736576e4e24df827dab2 Mon Sep 17 00:00:00 2001 From: Steven Evans Date: Sat, 7 Jul 2018 23:23:18 -0400 Subject: [PATCH] [refactor] Removed 'clearEventListenersEl' as it was never called --- utils/HelperFunctions.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/utils/HelperFunctions.js b/utils/HelperFunctions.js index a50dfbf73..71a5fe47b 100644 --- a/utils/HelperFunctions.js +++ b/utils/HelperFunctions.js @@ -1,14 +1,6 @@ //General helper functions import {isString} from "./helpers/isString"; -//Same as clearEventListeners except it takes a DOM element object rather than an ID -function clearEventListenersEl(el) { - if (el == null) {console.log("ERR: element passed into clearEventListenersEl is null"); return null;} - var newElem = el.cloneNode(true); - el.parentNode.replaceChild(newElem, el); - return newElem; -} - function removeElement(elem) { if (elem == null || !(elem instanceof Element)) {return;} while(elem.firstChild) {elem.removeChild(elem.firstChild);} @@ -62,8 +54,7 @@ function clearSelector(selector) { } } -export {clearEventListenersEl, - removeElement, +export {removeElement, createAccordionElement, removeChildrenFromElement, clearSelector};