From 46fe5cffc952b80371f839fce0aa2fc8ded27f50 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Wed, 26 Aug 2015 18:21:27 +0100 Subject: Use createElementNS for XML documents and remove XML specific codepaths This implements @gdh1995's idea from #1796. --- lib/utils.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/utils.coffee') diff --git a/lib/utils.coffee b/lib/utils.coffee index d4beff03..c0da6fb3 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -21,7 +21,7 @@ Utils = # Creates a single DOM element from :html createElementFromHtml: (html) -> - tmp = document.createElement("div") + tmp = DomUtils.createElement("div") tmp.innerHTML = html tmp.firstChild -- cgit v1.2.3 From 6125394ba844f4082803366ab9956dec13b547e2 Mon Sep 17 00:00:00 2001 From: gdh1995 Date: Fri, 28 Aug 2015 21:08:19 +0800 Subject: fix a bug that Utils using DomUtils remove Utils.createElementFromHtml since it's not in use --- lib/utils.coffee | 6 ------ 1 file changed, 6 deletions(-) (limited to 'lib/utils.coffee') diff --git a/lib/utils.coffee b/lib/utils.coffee index c0da6fb3..90469fad 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -19,12 +19,6 @@ Utils = func = obj[components.pop()] func.apply(obj, argArray) - # Creates a single DOM element from :html - createElementFromHtml: (html) -> - tmp = DomUtils.createElement("div") - tmp.innerHTML = html - tmp.firstChild - escapeHtml: (string) -> string.replace(//g, ">") # Generates a unique ID -- cgit v1.2.3