ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [6/7] incubator-ponymail git commit: convert to textNode if string
Date Fri, 02 Sep 2016 11:19:43 GMT
convert to textNode if string

might as well have this here as well, speeds up things.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/bdbf65e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/bdbf65e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/bdbf65e7

Branch: refs/heads/coffee-and-cake
Commit: bdbf65e783f6ce19b9353d978d457f19e32c7dba
Parents: 874179e
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Fri Sep 2 13:18:48 2016 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Fri Sep 2 13:18:48 2016 +0200

----------------------------------------------------------------------
 site/js/coffee/dom_utils.coffee | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/bdbf65e7/site/js/coffee/dom_utils.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/dom_utils.coffee b/site/js/coffee/dom_utils.coffee
index fe10125..9ca7fed 100644
--- a/site/js/coffee/dom_utils.coffee
+++ b/site/js/coffee/dom_utils.coffee
@@ -108,8 +108,14 @@ get = (a) ->
 HTMLElement.prototype.inject = (child) ->
     if isArray(child)
         for item in child
+            # Convert to textNode if string
+            if typeof item is 'string'
+                item = txt(item)
             this.appendChild(item)
     else
+        # Convert to textNode if string
+        if typeof child is 'string'
+            child = txt(child)
         this.appendChild(child)
     return child
 


Mime
View raw message