title: send events from python to javascript using sl4a
body: <p>I wanted to know the answer to a simple question but i have'nt found a good one 
  (i've google it for hours :) )</p>
  
  <p>I'm playing with the sl4a with python and i can send events from js to the python script, but the js is not catching the eventPost i put in the code below from python to js.</p>
  
  <p>Anyone knows how is this been done or if there is another way without the registerCallback?</p>
  
  <p><strong>HTML CODE :</strong> </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
  var droid = new Android();
  function doit(){
      droid.makeToast("Text send :=&gt;"+document.getElementById("msg").value);
      droid.eventPost("doit",document.getElementById("msg").value);
  }
  
  function alert_me(data){
      droid.makeToast("All done!");
      document.getElementById("msg").value = '';
  }
  
  droid.registerCallback("done",alert_me);
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;input type="text" name="boton" id="msg" value="" /&gt;
  &lt;input type="button" name="boton" value="Go!" onclick="javascript:doit()" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>PYTHON CODE:</strong></p>
  
  <pre><code>import android,time
  
  if __name__ == '__main__' :
  
      droid = android.Android()
      droid.webViewShow("file:///sdcard/sl4a/scripts/sample.html")
  
      while True:        
          event = droid.eventWait().result
          if event["name"] == 'doit':
            droid.makeToast("Event catched! %s" % event['data'])
  
            droid.eventPost("done","Done message")
            time.sleep(2)
  
  
      droid.exit()
  </code></pre>