Quote:
Originally Posted by silver18
I'm facing the same problem.
You could use
Code:
kindle.appmgr.onunload = function() { };
or the stock
Code:
window.onunload = function() { };
As regards me, I need something a bit more complicated as I have mutiple HTMLs (and the first solution seem to work only in the landing page) and some other problems here and there.
|
I suggest wrapping the application in a Kindle object as I did in
WebLaunch
This allow you to hook into "go", "unload" and "pause". "pause" is executed when the app leaves focus and "go" when it comes to focus. I think "unload" should be called when the app is really terminating, but I didn't capture that event yet.
When creating the base application with the Kindle template you can use kindle.chrome.createContentWindow() to load your other pages and keep the code active.