Thanks to some help from some developers at a MozCamp this weekend, I made significant progress on the python->javascript communication challenge.<br><br>In preparation for integrating Socialcalc with the journal, I've created a sample activity called OnePageWiki that is basically a notepad in a HTML page that saves and loads from the journal.  With this in place, it should be very easy to integrate with Socialcalc, or other HTML and Javascript based applications.<br>
<br>The activity code uses my new package - XOCom (like XPCom but easier), and a library called xo.js to register javascript callbacks in the web page being displayed.  This sample activity just saves and loads the content to a textarea.  In XOCom, Python communicates with javascript through the nsIObserverService, where messages are passed synchronously to the javascript observer.  Python creates a mutable array, and sends this with the notification to the javascript.  The javascript can read parameters from the array, or stick new values back in the array to return data to python.<br>
<br>The code is available here:  <br>  <a href="http://github.com/lukec/xocom">http://github.com/lukec/xocom</a><br><br>And you can install the latest package from here:<br>  <a href="http://github.com/lukec/xocom/tree/master%2FOnePageWikiActivity-1.xo?raw=true">http://github.com/lukec/xocom/tree/master%2FOnePageWikiActivity-1.xo?raw=true</a><br>
  (or: <a href="http://tinyurl.com/6jye6z">http://tinyurl.com/6jye6z</a>)<br><br>Feedback or patches are welcome.<br><br>Cheers,<br>Luke<br>