Commit 297e193b authored by Akikonata's avatar Akikonata

兼容IE

parent 65db24ac
...@@ -33,9 +33,15 @@ KM.registerToolbarUI( 'saveto', function ( name ) { ...@@ -33,9 +33,15 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
function doDownload( url, filename ) { function doDownload( url, filename ) {
var a = document.createElement( 'a' ); var a = document.createElement( 'a' );
a.setAttribute( 'download', filename ); a.setAttribute( 'download', filename );
//a.setAttribute( 'href', url ); a.setAttribute( 'href', url );
console.log( a ); var evt;
a.dispatchEvent( new MouseEvent( 'click' ) ); if ( document.createEvent ) {
evt = document.createEvent( 'MouseEvents' );
evt.initMouseEvent( 'click', true, true );
} else {
evt = new MouseEvent( 'click' );
}
a.dispatchEvent( evt );
} }
comboboxWidget.on( 'comboboxselect', function ( evt, res ) { comboboxWidget.on( 'comboboxselect', function ( evt, res ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment