aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dom_utils.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dom_utils.coffee')
-rw-r--r--lib/dom_utils.coffee5
1 files changed, 5 insertions, 0 deletions
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
@@ -9,6 +9,11 @@ DomUtils =
)()
#
+ # 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
# here.