infragram
infragram copied to clipboard
Use of initMouseEvent is deprecated
In infragram.js, initMouseEvent is used, but as the use of initMouseEvent has been deprecated, so I can be fixed by the below modification
Here is the code snippet where the issue exists:
event = document.createEvent("MouseEvents"); event.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); lnk.dispatchEvent(event);
Can be fixed by below modification:
const mouseEvent = getMouseEvent(); lnk.dispatchEvent(mouseEvent("click", { screenX: 0, screenY: 0, clientX: 0, clientY: 0 }));
@TildaDares , if my above solution is fine can I work on this issue? Please correct me if I am wrong! Or if it's fine I can also create it as an FTO template so that it could be assigned to someone else😊
Hi @Somya-Singhal either way would be great, thank you!!
Thanks @jywarren , for reviewing the issue. I have linked the PR #324 . Can you please review it and inform me if any changes are required?