Rocky_Mountain_Vending/.pnpm-store/v10/files/81/5f601d1dde2406edc976184e64bd66ef29e98ee5f262d978c62225ca0c5cafc8667f131e6f3dc86f16f321cf6026da672b08dfdb21bf35e99c2afd1820ba77
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

46 lines
1 KiB
Text

/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
import type {CdpFrame} from './Frame.js';
/**
* @internal
*/
export class CdpPreloadScript {
/**
* This is the ID of the preload script returned by
* Page.addScriptToEvaluateOnNewDocument in the main frame.
*
* Sub-frames would get a different CDP ID because
* addScriptToEvaluateOnNewDocument is called for each subframe. But
* users only see this ID and subframe IDs are internal to Puppeteer.
*/
#id: string;
#source: string;
#frameToId = new WeakMap<CdpFrame, string>();
constructor(mainFrame: CdpFrame, id: string, source: string) {
this.#id = id;
this.#source = source;
this.#frameToId.set(mainFrame, id);
}
get id(): string {
return this.#id;
}
get source(): string {
return this.#source;
}
getIdForFrame(frame: CdpFrame): string | undefined {
return this.#frameToId.get(frame);
}
setIdForFrame(frame: CdpFrame, identifier: string): void {
this.#frameToId.set(frame, identifier);
}
}