Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

When no href value exists on a link the user selects to follow, attempt pt to click() the link to blindly trigger any JS events bound to it #783

Merged

Conversation

YoloClin
Copy link

@YoloClin YoloClin commented Aug 2, 2020

This PR will successfully trigger JS events in the following edge case:

<a id="clickme">Click me!</a>
<script>$("#clickme").on("click", function(){ alert(1) });</script>

It's reasonable to assume the user doesn't care whether or not the anchor has a valid href or triggers JS, so vim-vixen should just allow it to occur.

…pt to click() the link to blindly trigger any JS events bound to it
Copy link
Owner

@ueokande ueokande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ueokande ueokande merged commit 6f7f501 into ueokande:master Aug 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants