async evaluateOnNewDocument(mainFn, options) {
    const argsSerialized = ExecutionContext.serializeArguments(options.args);
    const depsSerialized = ExecutionContext.serializeDeps(options.deps);

    const expression = `(() => {
      ${ExecutionContext._cachedNativesPreamble};
      ${depsSerialized};
      (${mainFn})(${argsSerialized});
    })()
    //# sourceURL=_lighthouse-eval.js`;

    await this._session.sendCommand('Page.addScriptToEvaluateOnNewDocument', {source: expression});
  }
Evaluate a function on every new frame from now on.
@template {unknown[]} T
@param {((...args: T) => void)} mainFn The main function to call.
@param {{args: T, deps?: Array<Function|string>}} options `args` should
  match the args of `mainFn`, and can be any serializable value. `deps` are functions that must be
  defined for `mainFn` to work.
@return {Promise<void>}