As we discussed on IRC, I think this should be `window.setTimeout(_doExport, 0)` instead of calling `_doExport()` immediately.