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

add ready event after setupDeclarativeReflexes #312

Merged
merged 1 commit into from
Sep 19, 2020

Conversation

leastbad
Copy link
Contributor

Type of PR (feature, enhancement, bug fix, etc.)

Enhancement

Description

Moves emitEvent into utils.js and adds a stimulus-reflex:ready event which fires each time the setupDeclarativeReflexes function finishes.

Why should this be added

This feature was requested by @scottbarrow to aid in configuring Cypress test runners needing to wait until SR is ready for automated button clicking to begin. The alternative was a hard-coded delay which is slow and unreliable.

Checklist

  • My code follows the style guidelines of this project
  • Checks (StandardRB & Prettier-Standard) are passing

@leastbad leastbad merged commit 23c8631 into stimulusreflex:master Sep 19, 2020
@leastbad leastbad deleted the ready_event branch September 19, 2020 13:38
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 this pull request may close these issues.

2 participants