// Everything CanJS+jquery app needs to run to pass
// if you are doing almost everything with the can.util layer
steal("can-simple-dom", "./make_parser", function(simpleDOM, makeParser){
	
	var document = new simpleDOM.Document();
	var serializer = new simpleDOM.HTMLSerializer(simpleDOM.voidMap);
	var parser = makeParser(document);
	
	if(Object.defineProperty) {
		Object.defineProperty(simpleDOM.Element.prototype, "innerHTML", {
			get: function(){
				return serializer.serialize(this.firstChild);
			},
			set: function(html){
				// remove all children
				var cur = this.firstChild;
				while(cur) {
					this.removeChild(cur);
					cur = this.firstChild;
				}
				if(""+html) {
					var frag = parser.parse(""+html);
					this.appendChild(frag);
				}
			}
		});
	}
	global.document = document;
	global.window = global;
	global.addEventListener = function(){};
	global.removeEventListener = function(){};
	
});

@@ -181,17 +181,16 @@
 arser)%7B%0A
-%09
 %0A%09var do
@@ -327,17 +327,16 @@
 ument);%0A
-%09
 %0A%09if(Obj
@@ -363,74 +363,59 @@
 %7B%0A%09%09
-Object.defineProperty(simpleDOM.Element.prototype, %22innerHTML%22,
+var descriptor = function(outerHtml)%7B%0A%09%09%09return
  %7B%0A
+%09
 %09%09%09g
@@ -430,16 +430,17 @@
 tion()%7B%0A
+%09
 %09%09%09%09retu
@@ -463,16 +463,35 @@
 rialize(
+outerHtml ? this : 
 this.fir
@@ -507,11 +507,13 @@
 %0A%09%09%09
+%09
 %7D,%0A
+%09
 %09%09%09s
@@ -536,16 +536,17 @@
 l)%7B%0A%09%09%09%09
+%09
 // remov
@@ -560,16 +560,17 @@
 hildren%0A
+%09
 %09%09%09%09var 
@@ -596,16 +596,17 @@
 ld;%0A%09%09%09%09
+%09
 while(cu
@@ -606,24 +606,25 @@
 hile(cur) %7B%0A
+%09
 %09%09%09%09%09this.re
@@ -644,16 +644,17 @@
 );%0A%09%09%09%09%09
+%09
 cur = th
@@ -664,24 +664,25 @@
 firstChild;%0A
+%09
 %09%09%09%09%7D%0A%09%09%09%09if
@@ -679,16 +679,17 @@
 %09%09%7D%0A%09%09%09%09
+%09
 if(%22%22+ht
@@ -690,24 +690,25 @@
 (%22%22+html) %7B%0A
+%09
 %09%09%09%09%09var fra
@@ -734,16 +734,17 @@
 +html);%0A
+%09
 %09%09%09%09%09thi
@@ -772,18 +772,191 @@
 %09%09%09%09
+%09
 %7D%0A
+%09
 %09%09%09%7D%0A%09%09
-%7D
+%09%7D;%0A%09%09%7D;%0A%09%09Object.defineProperty(simpleDOM.Element.prototype, %22innerHTML%22, descriptor());%0A%09%09Object.defineProperty(simpleDOM.Element.prototype, %22outerHTML%22, descriptor(true)
 );%0A%09
@@ -1096,14 +1096,13 @@
 on()%7B%7D;%0A
-%09
 %0A%7D);%0A

Give vdom an outerHTML