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

Refactor Event Options test helpers #541

Merged

Conversation

radiantshaw
Copy link
Contributor

Refactor the following lines of code:

set actionValue(value: string) {
this.buttonElement.setAttribute("data-action", value)
}
set elementActionValue(value: string) {
this.element.setAttribute("data-action", value)
}

and replace it with a new method called setAction that accepts an Element onto which to set the action. This is similar in signature to triggerEvent.

Resolves the conversation: #535 (comment).

Nipun Paradkar added 2 commits May 1, 2022 14:02
... and modify `actionValue` to accept an element onto which the action
should be set. Defaults to `this.element` when the element isn't
provided.
... that has the same method signature as the `triggerEvent` method.
@radiantshaw
Copy link
Contributor Author

@dhh Can we merge this PR if everything looks okay? Is there anything else that needs to be done?

Copy link
Member

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

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

Thank you @radiantshaw, I think this looks good!

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

Successfully merging this pull request may close these issues.

2 participants