annotate OrthancFramework/Resources/CMake/WebAssembly/ArithmeticTests/app.js @ 5084:9770d537880d attach-custom-data

added support for revision in SQLite + avoid upgrading DB version
author Alain Mazy <am@osimis.io>
date Thu, 15 Sep 2022 09:02:07 +0200
parents d25f4c0fa160
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 }