CustomEvent() across Firefox add-on, sandbox -- demo

CustomEvent() currently does not serialize array data properly when sending event data across the XPCNativeWrapper to and from a web page and a Firefox extension.

Open the Firebug console and Firefox's error console (Control-Shift-J) to see the results.

Reference Stack Overflow question, "Add-On is sending javascript Array as an Object" .

Test add-on not detected!
Go to and install or "Test run" it, then reload this page.

Press a button to send a CustomEvent with the indicated data. In both cases the add-on will send back an event. See the two consoles for results.

WARNING: The normal button works a little, the first time. After that, both message-data styles get corrupted (detail is null, coming from the extension).