title: Why is 'gapi.client' from Google Plus Api undefined ?
body: <p>I am trying to use google+ api, and i had to modify the sample authentification example to fit my needs like this:</p>
  
  <pre><code>&lt;script src="https://apis.google.com/js/client.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Instead of this: </p>
  
  <pre><code>&lt;script src="https://apis.google.com/js/client.js?onload=handleClientLoad"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Basically removed the onload parameter, and placed all the functionality on dom ready.</p>
  
  <p>Here is the problem which i just don't understand:</p>
  
  <p>Code:</p>
  
  <pre><code>console.log(gapi);
  console.log(gapi.client);
  
  $.each(gapi, function(){
  
          console.log(this);
  
  });
  
  gapi.client.setApiKey(this.options.apiKey);
  </code></pre>
  
  <p>Output:</p>
  
  <p><img src="https://i.stack.imgur.com/Pfgzy.jpg" alt="enter image description here"></p>
  
  <p>So, my question basically is:</p>
  
  <p>Why at console.log(gapi) it shows that it has sub-objects like client and auth, and at console.log(gapi.client) it says undefined ?</p>