B2G/gecko/services/aitc/modules/browserid.js
// Try to get the user's email(s). If user isn't logged in, this will be empty
Try to get the user's email(s). If user isn't logged in, this will be empty
Try to get the user ' s email ( s ) . If user isn ' t logged in this will be empty
function _getEmails(cb, options, sandbox) {
    let self = this;
    if (!sandbox) {
      cb(new Error("Sandbox not created"), null);
      return;
    }
    function callback(res) {
      let emails = {};
      try {
        emails = JSON.parse(res);
      } catch (e) {
        self._log.error("Exception in JSON.parse for _getAssertion: " + e);
      }
      self._gotEmails(emails, sandbox, cb, options);
    }
    sandbox.box.importFunction(callback);
    let scriptText =
      "var list = window.BrowserID.User.getStoredEmailKeypairs();" +
      "callback(JSON.stringify(list));";
    Cu.evalInSandbox(scriptText, sandbox.box, "1.8", this.ID_URI, 1);
  }
function _getEmails ( cb , options , sandbox ) { let self = this ; if ( ! sandbox ) { cb ( new Error ( "Sandbox not created" ) , null ) ; return ; } function callback ( res ) { let emails = { } ; try { emails = JSON . parse ( res ) ; } catch ( e ) { self . _log . error ( "Exception in JSON.parse for _getAssertion: " + e ) ; } self . _gotEmails ( emails , sandbox , cb , options ) ; } sandbox . box . importFunction ( callback ) ; let scriptText = "var list = window.BrowserID.User.getStoredEmailKeypairs();" + "callback(JSON.stringify(list));" ; Cu . evalInSandbox ( scriptText , sandbox . box , "1.8" , this . ID_URI , 1 ) ; }
Try to get the user's email(s).
Try to get the user ' s email ( s ) .