This page provides a test of a sample "app shell component."

Clicking on the button below will:

  1. Execute a JavaScript function that will use XPConnect to dynamically access that sample component (as a "service" in the nsIServiceManager sense). Specifically, it will invoke the "DoDialogTests()" member on that service.
  2. That will trigger display of a sequence of dialogs. The first will open a dialog from C++. You enter some text on that dialog and press a button.
  3. That triggers display of a similar dialog from JavaScript. You enter some text there and press another button.
  4. Finally, you return here and the results are displayed, demonstrating that input was passed along to each dialog in turn and that the results were passed back!

This sample also demonstrates how to implement an interface in JavaScript and how to use that interface to communicate with other code using the nsIObserverService (that's how the results show up back here).