File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 12
12
}
13
13
14
14
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 ) ;
17
18
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 ;
21
24
}
22
25
23
26
window . cleanxml = function ( ) {
32
35
</ script >
33
36
</ head >
34
37
< body onload ="cleanxml() ">
35
- < form onsubmit ="test_xslt();return false ">
38
+ < form onsubmit ="test_xslt() ">
36
39
< table >
37
40
< tr >
38
41
< td >
You can’t perform that action at this time.
0 commit comments