Page 1 of 1

When to use device ready vs onload?

Posted: Wed Aug 12, 2015 11:15 pm
by Miguel Navarro7469744

I've done most of my core infrastructure/development on a project and I'm trying to make sure now it's stable and there are no issues/errors. Most of the time I have been using the onload event to do things like read from the database, read from files on the device, and other things which require cordova, but the cordova stuff is primarily invoked after the page loads and a user clicks a button. Should I go through my entire app and switch everything to the on device ready event if cordova is called? Are services defined within appery already on device ready safe? I haven't noticed any real issues because I never get errors that the cordova functionality is not available.


When to use device ready vs onload?

Posted: Thu Aug 13, 2015 10:58 am
by Alena Prykhodko

Hello Miguel,

Load – fires after the page is successfully loaded and inserted into the DOM.

Page show – fires every time the page is displayed after the transition animation has completed.

Events description you can find here https://devcenter.appery.io/documenta...