file_bug1309630.html (525B)
1 <script> 2 let styleDoc = fetch("bug1309630.sjs") 3 .then(response => { 4 if (response.ok) { 5 return response.text(); 6 } 7 return Promise.reject(); 8 }).then(xslt => { 9 let styleDoc = new DOMParser().parseFromString(xslt, "text/xml"); 10 let originalDoc = new DOMParser().parseFromString( 11 "<root/>", 12 "text/xml" 13 ); 14 15 let processor = new XSLTProcessor(); 16 processor.importStylesheet(styleDoc); 17 processor.transformToDocument(originalDoc); 18 }); 19 </script>>