range-on-pi-contextual-fragment-crash.html (669B)
1 <!DOCTYPE html> 2 <head> 3 <title>createContextualFragment should not crash when the end node is a processing instruction</title> 4 <link rel="author" title="Simon Wülker" href="mailto:simon.wuelker@arcor.de"> 5 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-range-createcontextualfragment"> 6 <link rel="help" href="https://github.com/servo/servo/issues/40719"> 7 </head> 8 <body> 9 <script> 10 let pi = document.createProcessingInstruction("xml-stylesheet", 'href="mycss.css" type="text/css"'); 11 let range = document.createRange(); 12 range.setEnd(pi, 0) 13 range.createContextualFragment("<div>A</div>"); 14 </script> 15 </body>