title: puppeteer evaluate functional with callback
body: <p>I am trying to evaluate a function with puppeteer but the callback is never firing (i am certain the host page is working as expected). </p>
  
  <p>On the host page a listener works like:</p>
  
  <pre><code>DB.when('ready').execute(function(db){
    // DB can execute stuff
  })
  </code></pre>
  
  <p>My puppeteer code attempts to fetch the db that is ready:</p>
  
  <pre><code>try {
    const dbhandle = await page.evaluate('DB.when("ready")');
    const result = await page.evaluate(db =&gt; db.execute, function(images) {
      console.log(JSON.stringify(images));
      //do stuff with callback
    }, dbhandle);
      console.log('result', JSON.stringify(result));
  } catch (e) {
      console.log('evaluate', e);
  } finally {
      console.log('finally');
  }
  </code></pre>
  
  <p>Am having no luck on this. </p>