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, 3 insertions, 2 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee
index ef34207e..47ee6518 100644
--- a/lib/dom_utils.coffee
+++ b/lib/dom_utils.coffee
@@ -12,12 +12,13 @@ DomUtils =
element = document.createElement tagName
if element.style
# The document namespace provides (X)HTML elements, so we can use them directly.
- @createElement = document.createElement.bind document
+ @createElement = (tagName) -> document.createElement tagName
element
else
# The document namespace doesn't give (X)HTML elements, so we create them with the correct namespace
# manually.
- @createElement = document.createElementNS.bind document, "http://www.w3.org/1999/xhtml"
+ @createElement = (tagName) ->
+ document.createElementNS document, "http://www.w3.org/1999/xhtml", tagName
@createElement(tagName)
#