diff --git a/src/lib/template/dom-if.html b/src/lib/template/dom-if.html
index bd3f5c125c..7c5e049177 100644
--- a/src/lib/template/dom-if.html
+++ b/src/lib/template/dom-if.html
@@ -85,10 +85,10 @@
},
/**
- * Forces the element to render its content. Normally rendering is
- * asynchronous to a provoking change. This is done for efficiency so
- * that multiple changes trigger only a single render. The render method
- * should be called if, for example, template rendering is required to
+ * Forces the element to render its content. Normally rendering is
+ * asynchronous to a provoking change. This is done for efficiency so
+ * that multiple changes trigger only a single render. The render method
+ * should be called if, for example, template rendering is required to
* validate application state.
*/
render: function() {
@@ -98,7 +98,6 @@
_render: function() {
if (this.if) {
if (!this.ctor) {
- this._wrapTextNodes(this._content || this.content);
this.templatize(this);
}
this._ensureInstance();
@@ -140,18 +139,6 @@
}
},
- _wrapTextNodes: function(root) {
- // wrap text nodes in span so they can be hidden.
- for (var n = root.firstChild; n; n=n.nextSibling) {
- if (n.nodeType === Node.TEXT_NODE && n.textContent.trim()) {
- var s = document.createElement('span');
- root.insertBefore(s, n);
- s.appendChild(n);
- n = s;
- }
- }
- },
-
_showHideChildren: function() {
var hidden = this.__hideTemplateChildren__ || !this.if;
if (this._instance) {
diff --git a/src/lib/template/templatizer.html b/src/lib/template/templatizer.html
index 299b6c5e4e..e89efef190 100644
--- a/src/lib/template/templatizer.html
+++ b/src/lib/template/templatizer.html
@@ -144,10 +144,22 @@
var c = this._children;
for (var i=0; i