From a697646163a5ab9ec6096591b8184a29fa49f2e9 Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Sat, 4 Aug 2012 22:14:48 -0700 Subject: Refactor link hints to be more functional. This paves the way for the hints code to be reused in other modes. --- lib/dom_utils.coffee | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 0ce9c50c..c0efd344 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -8,6 +8,11 @@ DomUtils = (callback) -> if loaded then callback() else window.addEventListener("DOMContentLoaded", callback) )() + # + # Remove an element from its DOM tree. + # + removeElement: (el) -> el.parentNode.removeChild el + # # Takes an array of XPath selectors, adds the necessary namespaces (currently only XHTML), and applies them # to the document root. The namespaceResolver in evaluateXPath should be kept in sync with the namespaces -- cgit v1.2.3