 	constructor: (a...) ->
 		a[2] ?= Node.ELEMENT_NODE
 		super a...
+		@style = {}
 	getElementsByClassName: (name) ->
 		ret = []
 		for c in @childNodes

		c._private.childIndex = -1
	@childNodes.length = 0
	@appendChild fragment
Element::__defineGetter__ 'innerText', () ->
	t = []
	for c in @childNodes
		if c.nodeType in [Node.TEXT_NODE, Node.CDATA_SECTION_NODE]
			t.push c.toString(false, false)
		else if c.nodeType isnt Node.COMMENT_NODE
			t.push c.innerText
	return t.join('')

class Attr extends Node
	constructor: (name, value) ->

				delete @ownerDocument?._private.idMap[@id]
	# selectors
	matchesSelector: (selector) ->
		@ownerDocument?._private.matcher.match(@, selector)
	querySelector: (selector) ->
		@ownerDocument?._private.matcher.select(selector, @)[0]
	querySelectorAll: (selector) ->
