Mercurial > hg > orthanc-stone
view Resources/CodeGeneration/testWasmIntegrated/DefaultLibrary.js @ 1355:4971b1c5dfa6 broker
Added DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR
macro to control behavior based on the Emscripten option at
runtime. This will be removed once all apps have switched.
| author | Benjamin Golinvaux <bgo@osimis.io> |
|---|---|
| date | Wed, 15 Apr 2020 14:52:53 +0200 |
| parents | f185cfcb72a0 |
| children |
line wrap: on
line source
// this file contains the JS method you want to expose to C++ code mergeInto(LibraryManager.library, { // each time the Application updates its status, it may signal it through this method. i.e, to change the status of a button in the web interface // It needs to be put in this file so that the emscripten SDK linker knows where to find it. SendFreeTextFromCppJS: function(statusUpdateMessage) { var statusUpdateMessage_ = UTF8ToString(statusUpdateMessage); window.SendFreeTextFromCpp(statusUpdateMessage_); }, SendMessageFromCppJS: function(statusUpdateMessage) { var statusUpdateMessage_ = UTF8ToString(statusUpdateMessage); window.SendMessageFromCpp(statusUpdateMessage_); } });
