title: How to implement callback after sending message to NaCl (Chrome Native Client)?
body: <p>Simple question from NaCl newbie ...</p>
  
  <p>In my javascript, I post a message to the NaCl module.<br>
  How do I execute a callback in the javascript after this message is handled by the NaCl module?</p>
  
  <p>In the <a href="https://developer.chrome.com/native-client/devguide/tutorial/tutorial-part1" rel="nofollow">getting-started-tutorial</a>, the following example is given.</p>
  
  <pre><code> function moduleDidLoad() {
        HelloTutorialModule = document.getElementById('hello_tutorial');
        updateStatus('SUCCESS');
        // Send a message to the Native Client module
        HelloTutorialModule.postMessage('hello');
      }
  </code></pre>
  
  <p>How do I execute a callback function in HelloTutorialModule.postMessage('hello'); ?</p>
  
  <p>Thanks.</p>