Commit 2a119e9c authored by Akikonata's avatar Akikonata

兼容IE

parent 297e193b
......@@ -35,11 +35,11 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
a.setAttribute( 'download', filename );
a.setAttribute( 'href', url );
var evt;
if ( document.createEvent ) {
try {
evt = new MouseEvent( 'click' );
} catch ( error ) {
evt = document.createEvent( 'MouseEvents' );
evt.initMouseEvent( 'click', true, true );
} else {
evt = new MouseEvent( 'click' );
}
a.dispatchEvent( evt );
}
......
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