aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdh19952015-08-28 22:26:05 +0800
committergdh19952015-08-28 22:26:05 +0800
commit83aee937126727228a58a85a0ba1a8c5cab03010 (patch)
tree6b424682c69ca609154b22ab18e43e3acf8874b1
parent854a7972c21e5fedfbca6c06e2671d7466369919 (diff)
downloadvimium-83aee937126727228a58a85a0ba1a8c5cab03010.tar.bz2
remove `.bind` imported in da8653f because dom tests fail if bind exists
-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)
#