How can I trigger and bind to arbitrary events within a Chrome extension?
===

I have some code in a background script.  I want to be able to fire something like:

    $(document).trigger('someEvent', [args]);

And then in a popup listen for it with something like this:

    var backgroundPage = chrome.extension.getBackgroundPage();
    $(backgroundPage.document).bind('someEvent', function (args) {...});

But that doesn't work.  The trigger code gets triggered, but clearly I'm not binding to the right thing.  Help?