Toura/mulberry — pull request #239 by rmurphey (2012-01-04 18:36:07+00:00)
Title: JSONP helper

This avoids the need to use `dojo.io.script.get`. Instead, you can do:

```
toura.jsonp(url, config);
```

The `toura.jsonp` method returns a promise. It can take one or two arguments.

- In the two-argument case, it should be passed a URL as the first argument, and a config object as the second argument. The config argument can have the standard Dojo XHR config properties.
- In the one-argument case, the sole argument can be:
- A string URL, in which case the callback param name will default to "callback"
- A config object, in which case the config object must specify a `url` property

So, for example, the following are valid:

```
toura.jsonp('http://search.twitter.com/search.json?q=toura');

toura.jsonp('http://search.twitter.com/search.json?q=toura', {
load : function() {
console.log('success');
},
error : function() {
console.log('error');
}
});

toura.jsonp({
url : 'http://search.twitter.com/search.json?q=toura'
});
```