dist/joint.nowrap.js
function(blob, fileName) {

            if (window.navigator.msSaveBlob) { // requires IE 10+
                // pulls up a save dialog
                window.navigator.msSaveBlob(blob, fileName);

            } else { // other browsers
                // downloads directly in Chrome and Safari

                // presents a save/open dialog in Firefox
                // Firefox bug: `from` field in save dialog always shows `from:blob:`
                // https://bugzilla.mozilla.org/show_bug.cgi?id=1053327

                var url = window.URL.createObjectURL(blob);
                var link = document.createElement('a');

                link.href = url;
                link.download = fileName;
                document.body.appendChild(link);

                link.click();

                document.body.removeChild(link);
                window.URL.revokeObjectURL(url); // mark the url for garbage collection
            }
        }
function(blob, fileName) {

            if (window.navigator.msSaveBlob) { // requires IE 10+
                // pulls up a save dialog
                window.navigator.msSaveBlob(blob, fileName);

            } else { // other browsers
                // downloads directly in Chrome and Safari

                // presents a save/open dialog in Firefox
                // Firefox bug: `from` field in save dialog always shows `from:blob:`
                // https://bugzilla.mozilla.org/show_bug.cgi?id=1053327

                var url = window.URL.createObjectURL(blob);
                var link = document.createElement('a');

                link.href = url;
                link.download = fileName;
                document.body.appendChild(link);

                link.click();

                document.body.removeChild(link);
                window.URL.revokeObjectURL(url); // mark the url for garbage collection
            }
        }
function ( blob , fileName ) { if ( window . navigator . msSaveBlob ) { // requires IE 10+ // pulls up a save dialog window . navigator . msSaveBlob ( blob , fileName ) ; } else { // other browsers // downloads directly in Chrome and Safari // presents a save/open dialog in Firefox // Firefox bug: `from` field in save dialog always shows `from:blob:` // https://bugzilla.mozilla.org/show_bug.cgi?id=1053327 var url = window . URL . createObjectURL ( blob ) ; var link = document . createElement ( 'a' ) ; link . href = url ; link . download = fileName ; document . body . appendChild ( link ) ; link . click ( ) ; document . body . removeChild ( link ) ; window . URL . revokeObjectURL ( url ) ; // mark the url for garbage collection } }
Download `blob` as file with `fileName`. Does not work in IE9.
Download blob as file with fileName . Does not work in IE9 .