 
 	trimTemplate: (template) ->
 		if template.nodeType
-			if template.nodeName == "TEMPLATE"
+			if template.nodeName is "TEMPLATE"
 				if not template.firstChild
 					html = template.innerHTML
 					if html

		return unless @_dom
		child = @_dom.firstElementChild
		while child
			if child.nodeName == "TEMPLATE"
				@regTemplate(child)
			child = child.nextElementSibling
		@_regDefaultTemplates()

		while child
			next = child.nextSibling
			if child.nodeType is 3	# TEXT
				if $.trim(child.nodeValue) is ""
					dom.removeChild(child)
			child = next
		return
