/* FileSaver.js
* A saveAs() FileSaver implementation.
- * 2014-08-29
+ * 2015-01-04
*
* By Eli Grey, http://eligrey.com
* License: X11/MIT
}
, force_saveable_type = "application/octet-stream"
, fs_min_size = 0
- // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 for
- // the reasoning behind the timeout and revocation flow
- , arbitrary_revoke_timeout = 10
+ // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and
+ // https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047
+ // for the reasoning behind the timeout and revocation flow
+ , arbitrary_revoke_timeout = 500 // in ms
, revoke = function(file) {
var revoker = function() {
if (typeof file === "string") { // file is an object URL
// while `this` is nsIContentFrameMessageManager
// with an attribute `content` that corresponds to the window
-if (typeof module !== "undefined" && module !== null) {
- module.exports = saveAs;
+if (typeof module !== "undefined" && module.exports) {
+ module.exports.saveAs = saveAs;
} else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
define([], function() {
return saveAs;