PageRenderTime 80ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/documentation/af.ui/$.ui.launch.md

https://github.com/maoyao/appframework
Markdown | 49 lines | 28 code | 21 blank | 0 comment | 0 complexity | 1adeb1fe44d509a4c663fffd3caf0be5 MD5 | raw file
  1. #$.ui.launch();
  2. ```
  3. This is callled when you want to launch afui. If autoLaunch is set to true, it gets called on DOMContentLoaded.
  4. If autoLaunch is set to false, you can manually invoke it.
  5. ```
  6. ##Example
  7. ```
  8. $.ui.autoLaunch=false;
  9. $.ui.launch();
  10. ```
  11. ##Parameters
  12. ```
  13. ```
  14. ##Returns
  15. ```
  16. undefined
  17. ```
  18. ##Detail
  19. $.ui.launch() tells App Framework UI to run the startup code. When $.ui.autoLaunch is set to true, this is called when the DOM is ready.
  20. ```
  21. $.ui.autoLaunch=false;
  22. /* Do your stuff */
  23. function doLaunch(){
  24. $.ui.launch();
  25. }
  26. document.addEventListener("intel.xdk.device.ready",doLaunch,false); //Intel apps
  27. document.addEventListener("deviceready",doLaunch,false);// Phonegap apps
  28. ```