Skip to content

Commit

Permalink
Simplify docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Brain, Daniel(dbrain) committed Apr 6, 2016
1 parent 11979fc commit 28c3844
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,46 +54,3 @@ postRobot.once('init', function(err, data, callback) {
postRobot.send(window, 'init', function(err, data) {
console.log('init done');
});
```
## Long form
```javascript
// In one window
postRobot.listen({
window: window.opener,
name: 'getCart',
handler: function(data, callback) {
setTimeout(function() {
return callback(null, {
amount: 1,
shipping: 2
});
}, 500)
}
});
// In another window
postRobot.request({
window: window,
name: 'getCart',
bridge: window.opener.frames.PayPalBridge.returnToParent,
response: function(err, data) {
if (err) {
throw err;
}
console.log('got cart!', data)
},
timeout: 1000
});
```

0 comments on commit 28c3844

Please # to comment.