 		@_private = extend @_private, {
 			idMap: {}
 		}
-	# adoptNode: NotSupported
-	# importNode: NotSupported
-	# caretRangeFromPoint: NotSupported
-	createAttribute: NotSupported # (name, value=null) ->
-		# n = new Attr(name, value)
-		# n.ownerDocument = @
-	# createAttributeNS: NotSupported
 	createCDATASection: (value) ->
 		new CData(value, @)
 	createComment: (value) ->

class DocumentFragment extends Node
	constructor: (owner) ->
		super "#document-fragment", null, Node.DOCUMENT_FRAGMENT_NODE, owner
		@__defineSetter__ 'parentNode', (v) =>
			throw Error "DocumentFragment cannot have a parentNode"
	toString: (pretty=false, deep=true) ->
		ret = []
		r = 0
		for c in @childNodes
			ret[r++] = c.toString pretty, deep
		return ret.join('')

class Document extends Element
	constructor: (a...) ->

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