Mercurial > hg > orthanc-stone
diff Platforms/Wasm/WasmWebService.js @ 509:1b9973905e15 bgo-commands-codegen
Fix to use js callbacks attached to 'window' + dummy changes in cmake files
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 06 Mar 2019 10:57:02 +0100 |
parents | 5055031f4a06 |
children | 861c080ef47b |
line wrap: on
line diff
--- a/Platforms/Wasm/WasmWebService.js Wed Mar 06 10:14:59 2019 +0100 +++ b/Platforms/Wasm/WasmWebService.js Wed Mar 06 10:57:02 2019 +0100 @@ -37,7 +37,7 @@ WasmWebService_ScheduleLaterCachedSuccessNotification: function (brol) { setTimeout(function() { - WasmWebService_NotifyCachedSuccess(brol); + window.WasmWebService_NotifyCachedSuccess(brol); }, 0); }, @@ -62,10 +62,10 @@ var headers = _malloc(s.length + 1); stringToUTF8(s, headers, s.length + 1); - WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response), + window.WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response), this.response.byteLength, headers, payload); } else { - WasmWebService_NotifyError(callableFailure, url_, payload); + window.WasmWebService_NotifyError(callableFailure, url_, payload); } } } @@ -94,10 +94,10 @@ var headers = _malloc(s.length + 1); stringToUTF8(s, headers, s.length + 1); - WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response), + window.WasmWebService_NotifySuccess(callableSuccess, url_, new Uint8Array(this.response), this.response.byteLength, headers, payload); } else { - WasmWebService_NotifyError(callableFailure, url_, payload); + window.WasmWebService_NotifyError(callableFailure, url_, payload); } } }