Rocky_Mountain_Vending/.pnpm-store/v10/files/ea/b1ac9ab287d5051af7b6330ab0e28a263bc97a0230ca04ea201eb98ab7bc51a9e61397a5bd1e9ec33504bf79c730d5c75312e46792a164cf70e8b2da08f48d
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

67 lines
1.9 KiB
Text

/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/* global getNodeDetails */
import BaseGatherer from '../base-gatherer.js';
import {pageFunctions} from '../../lib/page-functions.js';
/* eslint-env browser, node */
/**
* @return {LH.Artifacts['IFrameElements']}
*/
/* c8 ignore start */
function collectIFrameElements() {
const realBoundingClientRect = window.__HTMLElementBoundingClientRect ||
window.HTMLElement.prototype.getBoundingClientRect;
// @ts-expect-error - put into scope via stringification
const iFrameElements = getElementsInDocument('iframe'); // eslint-disable-line no-undef
return iFrameElements.map(/** @param {HTMLIFrameElement} node */ (node) => {
const clientRect = realBoundingClientRect.call(node);
const {top, bottom, left, right, width, height} = clientRect;
return {
id: node.id,
src: node.src,
clientRect: {top, bottom, left, right, width, height},
// @ts-expect-error - put into scope via stringification
isPositionFixed: isPositionFixed(node), // eslint-disable-line no-undef
// @ts-expect-error - getNodeDetails put into scope via stringification
node: getNodeDetails(node),
};
});
}
/* c8 ignore stop */
class IFrameElements extends BaseGatherer {
/** @type {LH.Gatherer.GathererMeta} */
meta = {
supportedModes: ['snapshot', 'navigation'],
};
/**
* @param {LH.Gatherer.Context} passContext
* @return {Promise<LH.Artifacts['IFrameElements']>}
* @override
*/
async getArtifact(passContext) {
const driver = passContext.driver;
const iframeElements = await driver.executionContext.evaluate(collectIFrameElements, {
args: [],
useIsolation: true,
deps: [
pageFunctions.getElementsInDocument,
pageFunctions.isPositionFixed,
pageFunctions.getNodeDetails,
],
});
return iframeElements;
}
}
export default IFrameElements;