Yeah I tried that but it seems that the inner body of a define is only evaluated when it's included in another file that requires it, so Raven will not be initialized and bound to window.onerror at page load by default (say if it's not specifically required by another module).  

It's handling two cases, one is to automatically initialize and bind to the global window handler, and the other is to provide a manually invokable proxy.  Is there some better way to organize it that satisfies both of those cases?