Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of initMouseEvent is deprecated #315

Open
Somya-Singhal opened this issue Apr 4, 2022 · 3 comments
Open

Use of initMouseEvent is deprecated #315

Somya-Singhal opened this issue Apr 4, 2022 · 3 comments

Comments

@Somya-Singhal
Copy link
Contributor

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 }));

@Somya-Singhal
Copy link
Contributor Author

Somya-Singhal commented Apr 4, 2022

@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😊

@jywarren
Copy link
Member

jywarren commented Apr 5, 2022

Hi @Somya-Singhal either way would be great, thank you!!

@Somya-Singhal
Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants