-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
32 lines (26 loc) · 740 Bytes
/
index.html
File metadata and controls
32 lines (26 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html>
<!-- fallback for browsers which do not support promise -->
<script src="es6-promise.min.js"></script>
<script src="syncLib.js"></script>
<script src="asyncLib.js"></script>
<script>
function onSuccess(response)
{
document.getElementById("divresponse").innerHTML = response;
}
function onError(error)
{
document.getElementById("divresponse").innerHTML = error.message;
}
function demoCallPromiseFn(params){
document.getElementById("divresponse").innerHTML = "computing....";
var objsyncLib=asyncLib();
objsyncLib.CallfnSyncLib(params).then(onSuccess, onError);
}
</script>
<body onload="javascript:demoCallPromiseFn(null);">
<div id="divresponse">
</div>
</body>
</html>