Cannot read property of 'load' undefined error
<p>I am working with the google drive API and am simply trying to load in the library when I get the error. </p>

<pre><code>function loadDriveApi(){
    gapi.client.load('drive','v3',setMeta())
}
</code></pre>

<p>that is the load function which i got from the documentation. This is called by an addlistener </p>

<pre><code>&lt;script&gt;document.getElementById('save').addEventListener('click',loadDriveApi())&lt;/script&gt;
</code></pre>

<p>and the loadDriveApi calls this function eventually.</p>

<pre><code>function setMeta(){
    var body={'contentHints.indexableText': document.getElementById('drop')}
    var request = gapi.client.drive.files.update({
        'fileId': document.getElementById('doc_id').value,
        'resource': body
    });
    request.execute(function(resp){
        console.log('Copy ID: ' + resp.id); 
    })  
}
</code></pre>

<p>This is driving me crazy and it's probably something so small and dumb that will end up being the issue but if you have any suggestions i'd love to hear them. I'm also quite the rookie with javascript so that could be why</p>

<p>Thanks</p>