Skip to content

Commit 88ce51e

Browse files
Updating interactive test per #116.
1 parent e72fb76 commit 88ce51e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

interactive-tests/xslt.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@
1212
}
1313

1414
window.test_xslt = function() {
15-
const xml = globalThis.XsltProcessor.xmlParse(el('xml').value);
16-
const xslt = globalThis.XsltProcessor.xmlParse(el('xslt').value);
15+
const xmlParser = new globalThis.XsltProcessor.XmlParser();
16+
const xml = xmlParser.xmlParse(el('xml').value);
17+
const xslt = xmlParser.xmlParse(el('xslt').value);
1718
const xsltClass = new globalThis.XsltProcessor.Xslt();
18-
const html = await xsltClass.xsltProcess(xml, xslt);
19-
el('html').value = html;
20-
el('htmldisplay').innerHTML = html;
19+
xsltClass.xsltProcess(xml, xslt).then(html => {
20+
el('html').value = html;
21+
el('htmldisplay').innerHTML = html;
22+
});
23+
return false;
2124
}
2225

2326
window.cleanxml = function() {
@@ -32,7 +35,7 @@
3235
</script>
3336
</head>
3437
<body onload="cleanxml()">
35-
<form onsubmit="test_xslt();return false">
38+
<form onsubmit="test_xslt()">
3639
<table>
3740
<tr>
3841
<td>

0 commit comments

Comments
 (0)