function waitForOobeScreen(screenName, fn) {
      if (Oobe.getInstance().currentScreen &&
          Oobe.getInstance().currentScreen.id === screenName) {
        fn();
      } else {
        $('oobe').addEventListener('screenchanged', function handler(e) {
          if (e.detail == screenName) {
            $('oobe').removeEventListener('screenchanged', handler);
            fn();
          }
        });
      }
    }
// Helper method that runs |fn| after |screenName| is visible.
Helper method that runs |fn| after |screenName| is visible.
Helper method that runs |fn| after |screenName| is visible .
function waitForOobeScreen(screenName, fn) {
      if (Oobe.getInstance().currentScreen &&
          Oobe.getInstance().currentScreen.id === screenName) {
        fn();
      } else {
        $('oobe').addEventListener('screenchanged', function handler(e) {
          if (e.detail == screenName) {
            $('oobe').removeEventListener('screenchanged', handler);
            fn();
          }
        });
      }
    }
function waitForOobeScreen ( screenName , fn ) { if ( Oobe . getInstance ( ) . currentScreen && Oobe . getInstance ( ) . currentScreen . id === screenName ) { fn ( ) ; } else { $ ( 'oobe' ) . addEventListener ( 'screenchanged' , function handler ( e ) { if ( e . detail == screenName ) { $ ( 'oobe' ) . removeEventListener ( 'screenchanged' , handler ) ; fn ( ) ; } } ) ; } }
Helper method that runs |fn| after |screenName| is visible.
Helper method that runs |fn| after |screenName| is visible .