This doesn't work, because *tabs.attach* doesn't actually have an *onAttach* option:

>15:30:06 - erikvold: hmm I don't think tab.attach({onAttach: function() {}}) is implemented
>15:30:12 - erikvold: onAttach doesn't seem to fire
>15:30:17 - erikvold: this is working tho:
>15:30:40 - erikvold: https://gist.github.com/erikvold/5710196

@erikvold says to do something like this, which works in my tests:

```
diff --git a/addon/lib/simulator.js b/addon/lib/simulator.js
index 548df9f..fd74613 100644
--- a/addon/lib/simulator.js
+++ b/addon/lib/simulator.js
@@ -921,18 +921,19 @@ let simulator = module.exports = {
     });
   },
 
   openTab: function(url, lax, cb) {
     cb = cb || function () {};
     for each (let tab in Tabs) {
       if (tab.url === url || (lax && tab.url.indexOf(url) === 0)) {
         tab.activate();
-        tab.attach({
-          onAttach: function attached(worker) {
+        let worker = tab.attach({
+          contentScript: "self.postMessage()",
+          onMessage: function() {
             worker.destroy();
             cb(tab);
           },
         });
         return;
       }
     }
 
@@ -943,18 +944,19 @@ let simulator = module.exports = {
   },
 
   openHelperTab: function(cb) {
     cb = cb || function () {};
     // Ensure opening only one simulator page
     if (this.worker) {
       let tab = this.worker.tab;
       tab.activate();
-      tab.attach({
-        onAttach: function attached(worker) {
+      let worker = tab.attach({
+        contentScript: "self.postMessage()",
+        onMessage: function() {
           worker.destroy();
           cb(tab);
         },
       });
     } else {
       this.openTab(simulator.contentPage, true, cb);
     }
   },
```

But we should also add a comment to these code blocks explaining that they're a workaround until someone fixes SDK [bug 879534](https://bugzilla.mozilla.org/show_bug.cgi?id=879534), something like:

```
        // Hacky workaround to ensure the tab is ready before we call
        // the callback.  Implement better approach after fixing SDK bug 879534!
        let worker = tab.attach({
          contentScript: "self.postMessage()",
          onMessage: function() {
            worker.destroy();
            cb(tab);
          },
        });
```