Add once method to event hubs
What does this MR do?
We recently started to migrate away from Vue event hubs in favor of a mitt
-based approach. However, mitt
doesn't expose a once
method, which can be a problem as we rely on the soon to be deprecated $once
method in some places.
This MR adds a .once()
method to our mitt event hubs and binds it to $once
as well.
An alternative approach would be to use dush
instead of mitt
as it supports once
out-of-the-box.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
-
Documentation (if required) -
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Paul Gascou-Vaillancourt