Skip to content

Conversation

@vamsi2246
Copy link

This PR improves the documentation in src/core/EventDispatcher.js by replacing an outdated alert() call with console.log() in the usage example.

Previously, the example used alert() to demonstrate event handling, which is discouraged as it blocks the main thread and interrupts the user experience.

Additionally, the example has been expanded to include a stop() method and a corresponding event listener, providing a more comprehensive demonstration of how to define and handle custom events.

Linked Issues
N/A

Additional context
Verified that the updated example code is valid JavaScript and correctly demonstrates the EventDispatcher functionality.

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.

1 participant