| James Graham | c81317a | 2016-05-09 20:46:52 | [diff] [blame^] | 1 | <html xmlns="http://www.w3.org/1999/xhtml"> | 
|  | 2 | <head> | 
|  | 3 | <title>innerHTML in XHTML</title> | 
|  | 4 | <link rel="author" title="Simon Pieters" href="mailto:simonp@opera.com"/> | 
|  | 5 | <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"/> | 
|  | 6 | <link rel="help" href="http://html5.org/specs/dom-parsing.html#dom-innerhtml"/> | 
|  | 7 | <link rel="help" href="http://www.whatwg.org/html5/#xml-fragment-serialization-algorithm"/> | 
|  | 8 | <script src="/resources/testharness.js"></script> | 
|  | 9 | <script src="/resources/testharnessreport.js"></script> | 
|  | 10 | </head> | 
|  | 11 | <body> | 
|  | 12 | <div id="log"></div> | 
|  | 13 | <iframe src="data:text/xml,<html xmlns='http://www.w3.org/1999/xhtml'><foo--/></html>"></iframe> | 
|  | 14 | <script><![CDATA[ | 
|  | 15 | var t = async_test(); | 
|  | 16 | window.onload = t.step_func(function() { | 
|  | 17 | var foo = window[0].document.documentElement.firstChild; | 
|  | 18 | assert_throws('SyntaxError', function() { | 
|  | 19 | foo.innerHTML = 'x<\/foo--><\!--y'; | 
|  | 20 | // This is ridiculous. | 
|  | 21 | }); | 
|  | 22 | t.done(); | 
|  | 23 | }); | 
|  | 24 | ]]></script> | 
|  | 25 | </body> | 
|  | 26 | </html> |