From cc739a6c574770f4dc9f6006a65c9016474e19d8 Mon Sep 17 00:00:00 2001 From: Vincent Nivoliers <vincent.nivoliers@univ-lyon1.fr> Date: Fri, 23 Sep 2016 16:38:42 +0200 Subject: [PATCH] testing mouse event fix --- js/pgm_construction.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/pgm_construction.js b/js/pgm_construction.js index a44a729..8b6a85c 100644 --- a/js/pgm_construction.js +++ b/js/pgm_construction.js @@ -227,7 +227,13 @@ function blob_download() { document.body.appendChild(link) ; window.requestAnimationFrame(function () { - var event = new MouseEvent('click'); + var event ; + if(typeof MouseEvent !nn 'function') { + event = document.createEvent("MouseEvent"); + event.initMouseEvent("click",true,true,window,0,0,0,0,0,false,false,false,false,0,null); + } else { + event = new MouseEvent('click'); + } link.dispatchEvent(event); document.body.removeChild(link); }); -- GitLab