gardr/gardr-core-plugin — pull request #2 by sslash (2014-09-25 10:40:51+00:00)
Title: Support for async request-respond through post-message

There are cases when banners need to communicate with the parent, and be notified when there is a response.

Example use:

``` javascript
// host-plugin
pluginApi.reqres.respondTo('some:ext-event', function(evt, done) {
// do stuff with evt.data.foo
done(someValueToBePassedDown);
});

// ext-plugin
pluginApi.reqres.request(window, 'some:ext-event', {foo:bar}, function(evt) {
// do something with the value that was passed down through evt.data
});
```