async getArtifact(passContext) {
    const session = passContext.driver.defaultSession;

    const anchors = await passContext.driver.executionContext.evaluate(collectAnchorElements, {
      args: [],
      useIsolation: true,
      deps: [
        pageFunctions.getElementsInDocument,
        pageFunctions.getNodeDetails,
      ],
    });
    await session.sendCommand('DOM.enable');

    // DOM.getDocument is necessary for pushNodesByBackendIdsToFrontend to properly retrieve nodeIds if the `DOM` domain was enabled before this gatherer, invoke it to be safe.
    await session.sendCommand('DOM.getDocument', {depth: -1, pierce: true});
    const anchorsWithEventListeners = anchors.map(async anchor => {
      const listeners = await getEventListeners(session, anchor.node.devtoolsNodePath);

      /** @type {Set<{type: string}>} */
      const ancestorListeners = new Set();
      const splitPath = anchor.node.devtoolsNodePath.split(',');
      const ancestorListenerPromises = [];
      while (splitPath.length >= 2) {
        splitPath.length -= 2;
        const path = splitPath.join(',');
        const promise = getEventListeners(session, path).then(listeners => {
          for (const listener of listeners) {
            ancestorListeners.add(listener);
          }
        }).catch(() => {});
        ancestorListenerPromises.push(promise);
      }

      await Promise.all(ancestorListenerPromises);

      return {
        ...anchor,
        listeners,
        ancestorListeners: Array.from(ancestorListeners),
      };
    });

    const result = await Promise.all(anchorsWithEventListeners);
    await session.sendCommand('DOM.disable');
    return result;
  }
@param {LH.Gatherer.Context} passContext
@return {Promise<LH.Artifacts['AnchorElements']>}