Skip to content

As a webworks developer, I have access to an exit event for when my application exits #393

nukulb opened this Issue Nov 27, 2012 · 6 comments

4 participants

nukulb commented Nov 27, 2012

Two APIs need to be exposed for this to be truly useful feature
APIs exposed

  • event - called exit under blackberry.event.addEventListener("exit", function () { ...} );

The application will get 3 seconds to terminate, if the application requires more time to exit then it must call extendTerminate(). Each time extendTerminate is called the application will get 2 more seconds to exit.
If the app does not terminate in allotted time it will be exited by the navigator.

Implementation -
Listen to exit event from the webplatform, under application.

Open Source Projects member
kwallis commented Nov 28, 2012

Can the app extend indefinitely? Seems like we shouldn't allow it to effectively never close.

Open Source Projects member
@bryanhiggins bryanhiggins added a commit to blackberry-webworks/BB10-WebWorks-Framework that referenced this issue Nov 29, 2012
@bryanhiggins bryanhiggins Implementation of and exit event
This is not working! executeJavaScript does not work to send the event to the client webview. It appears WebKit completely kills the webview as soon as the exit event occurs. Extend terminate is working from within the controller.

Issue #393

I looked into this, but got blocked by WebKit killing the client webview as soon as the exit event is fired. The controller fires executeJavaScript, but this is never invoked on the other side. Extend terminate does work as advertised, but it is of no use if the client webview doesn't live past the initial exit event.



can we use it to cancell the exit process ?... i mean, the user try to exit (but wrong or repent) then fire the callback and inside the callback a toast with the onclick button to cancel. I think use "toast" because the countdown time.

Open Source Projects member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.