chore: Fix TS issue on mouse event creation (#306)

This commit is contained in:
George Wilson 2017-07-18 16:01:19 +01:00 committed by Roman Hotsiy
parent 039bbdb585
commit 6bb3bd8d21

View File

@ -21,7 +21,10 @@ export function mouseclick( element ) {
// create a mouse click event
var dispatchedEvent
try {
dispatchedEvent = new MouseEvent('click', true);
dispatchedEvent = new MouseEvent('click', {
bubbles: true,
cancelable: false
});
} catch (e) {
dispatchedEvent = document.createEvent('MouseEvent');
dispatchedEvent.initEvent('click', true, false);