The Facebook API suggests that I load their source files with this:
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
I’ve also seen some Google API’s invoke an inline function. What’s the point? Why not just leave out the function declaration and invocation and just run the code inside by itself?