annotate Resources/WebAssembly/ArithmeticTests/app.js @ 3593:0301f59450fe

improved the patch for loading DICOM dictionary from memory
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Jan 2020 17:58:15 +0100
parents 04873915beaf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2510
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 function Initialize()
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 {
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 Module.ccall('Run2', // name of C function
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 null, // return type
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 [], // argument types
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 []);
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 Module.ccall('Run', // name of C function
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 'number', // return type
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 [], // argument types
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 []);
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 }
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 var Module = {
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 preRun: [],
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 postRun: [ Initialize ],
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 print: function(text) {
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 console.log(text);
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 },
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 printErr: function(text) {
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 if (text != 'Calling stub instead of signal()')
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 {
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 document.getElementById("stderr").textContent += text + '\n';
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 }
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 },
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 totalDependencies: 0
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 };
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 if (!('WebAssembly' in window)) {
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 alert('Sorry, your browser does not support WebAssembly :(');
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 } else {
04873915beaf configuration of DCMTK for WebAssembly
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 }