(function(aLeftPane) { ... }) ("History")
Is not an unusually structured function, it's a common pattern to encapsulate code in JS. What it does is declare an anonymous function and then immediately call it. It is used very often by libraries to create the lib entry point and cleanly separate private from public code without polluting the global namespace.
In your case, you actually want to unwrap the function :
function unwrapped(aLeftPane)
{
/**
* Select left panel in Library.
*
* @param aBrowser Browser object in selected tab.
...
}
then, in your xul or somewhere else:
oncommand="unwrapped('History');"