mirror of
https://github.com/9001/copyparty.git
synced 2026-06-22 05:53:29 -06:00
3DS MouseEvent polyfill
This commit is contained in:
parent
0d1f429838
commit
ed6faf6f33
|
|
@ -2451,6 +2451,15 @@ function xhrchk(xhr, prefix, e404, lvl, tag) {
|
|||
return fun(0, prefix + xhr.status + ": " + errtxt, tag);
|
||||
}
|
||||
|
||||
// polyfill for 3DS (IE11 can do this natively)
|
||||
var MouseEvent = function (eventType, params) {
|
||||
params = params || { bubbles: false, cancelable: false };
|
||||
var mouseEvent = document.createEvent('MouseEvent');
|
||||
mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||
|
||||
return mouseEvent;
|
||||
};
|
||||
|
||||
if (navigator.serviceWorker){
|
||||
// register service worker
|
||||
// ToDo: set http header: Service-Worker-Allowed: /
|
||||
|
|
|
|||
Loading…
Reference in a new issue