'use strict';

function run(instance, callback) {
  var html = instance.page.evaluate(function () {
    /* jshint browser: true */
    return document.querySelector('title').innerHTML;
  });
  
  // try a true async (best practice)
  setTimeout(function () {
    callback(null, html);
  }, 0);
}

module.exports.run = run;
