Mercurial > hg > orthanc
comparison Resources/WebAssembly/ArithmeticTests/app.js @ 2510:04873915beaf
configuration of DCMTK for WebAssembly
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Mar 2018 14:14:37 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2509:9d9f2d088dce | 2510:04873915beaf |
---|---|
1 function Initialize() | |
2 { | |
3 Module.ccall('Run2', // name of C function | |
4 null, // return type | |
5 [], // argument types | |
6 []); | |
7 | |
8 Module.ccall('Run', // name of C function | |
9 'number', // return type | |
10 [], // argument types | |
11 []); | |
12 } | |
13 | |
14 | |
15 var Module = { | |
16 preRun: [], | |
17 postRun: [ Initialize ], | |
18 print: function(text) { | |
19 console.log(text); | |
20 }, | |
21 printErr: function(text) { | |
22 if (text != 'Calling stub instead of signal()') | |
23 { | |
24 document.getElementById("stderr").textContent += text + '\n'; | |
25 } | |
26 }, | |
27 totalDependencies: 0 | |
28 }; | |
29 | |
30 | |
31 if (!('WebAssembly' in window)) { | |
32 alert('Sorry, your browser does not support WebAssembly :('); | |
33 } else { | |
34 } |