millermedeiros/requirejs-plugins — Issue #1: jsonp is undefined (not all the time though)
Author: Integralist
Created: 2011-11-17 09:48:45+00:00
State: open

Hi,

I've found that if I load your Google Maps example (Mac/Chrome 15) then it works all the time...

require(['async!http://maps.google.com/maps/api/js?sensor=false!callback', 'Utils/random'], function(empty, rand) {

// async is undefined but still loads the random.js utility script
console.log(rand);

//Google maps is available and all components are ready to use
var mapDiv = document.getElementById('map-canvas'),
map = new google.maps.Map(mapDiv, {
center: new google.maps.LatLng(37.4419, -122.1419),
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP,
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}
});

});

...but if I then add a separate `require()` to a twitter feed then it only works every other attempt when refreshing the page?

require(['async!http://twitter.com/statuses/user_timeline/Integralist.json!callback'], function(feed) {
console.log('feed: ', feed);
});

And again, if I load the twitter feed on its own then it to loads every time, but doing both together is too fragile.