async function fromSource(src, options) {
    const config = _.cloneDeep(options.jsdom);

    config.resources = new CustomResourcesLoader(options.htmlroot, options.strictSSL, options.userAgent);

    let page;
    if (isURL(src)) {
        page = await JSDOM.fromURL(src, config);
    } else if (isHTML(src)) {
        page = new JSDOM(src, config);
    } else {
        page = await JSDOM.fromFile(src, config);
    }

    if (options.inject) {
        if (typeof options.inject === 'function') {
            options.inject(page.window);
        } else {
            require(path.join(__dirname, options.inject))(page.window);
        }
    }

    return new Promise((resolve) => setTimeout(() => resolve(page), options.timeout));
}
Load a page.
@param  {String}  src
@param  {Object}  options
@return {Promise<JSDOM>}