 	# blur: NotSupported
 	# render
 	toString: (pretty=false, deep=true, indentLevel = 0) ->
-		try
-			name = @nodeName?.toLowerCase()
-		catch err
-			console.log @
-			throw err
+		name = @nodeName?.toLowerCase()
 		if pretty and deep
 			indent = repeat("  ", indentLevel)
 			newline = "\n"

			ret[r++] = indent + "</#{name}>" + newline
		ret.join('')

Element::__defineGetter__ 'tagName', () -> @nodeName
Element::__defineGetter__ 'innerHTML', () ->
	h = []

		@_private = extend @_private, {
			idMap: {}
		}
	createCDATASection: (value) -> new CData(value, @)
	createComment: (value) -> new Comment(value, @)
	createDocumentFragment: () -> new DocumentFragment(@)
	createElement: (name) ->
		nodeClass = ELEMENT_MAP[name?.toLowerCase()]
		if not nodeClass?
			new ELEMENT_MAP['_'](name.toUpperCase())
		else
			new nodeClass(null,null,null,@)
	# createEntityReference: NotSupported
	createEvent: (type) ->
		switch type
			when "MutationEvents" then new MutationEvent()
			else new Event()
	createTextNode: (text) -> new Text(text, @)
	getElementById: (id) -> @_private.idMap[id]

class HTMLDocument extends Document
	constructor: () ->
