Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import isOnCordova from '../utils/is-on-cordova';
  2.  
  3. export function initialize(container, application) {
  4. application.deferReadiness();
  5. document.addEventListener('deviceready', function() {
  6. application.advanceReadiness();
  7. }, false);
  8. if(!isOnCordova()){
  9. document.dispatchEvent(new Event('deviceready'));
  10. }
  11. }
  12.  
  13. export default {
  14. name: 'cordova-device-ready',
  15. initialize: initialize
  16. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement