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

feat: add on-cordova helper #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

betocantu93
Copy link

@betocantu93 betocantu93 commented Aug 19, 2021

Adds {{on-cordova}} helper for easier eventing on templates, this helper also implements the bubbles=false that you would expect from normal dom events so effectively mimicking stopPropatation() because this helper works as a stack, it adds a handler when executed and stops bubbling if any invocation passed bubbles false.

A demo is included in the dummy app, just open the console to see the order of which the event is executed. the practical use case is opening modals on top of each other and wanting to close them in order, avoiding a supposed /routes/application.js history.back() default handler

Screen Shot 2021-08-19 at 13 50 45

By the way a capacitor version is here, based on this addon: ember-capacitor-events

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