Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Move FrameManager to Frame.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparticuz committed Aug 22, 2022
1 parent 68e4797 commit 2b93a80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/index.ts
Expand Up @@ -200,7 +200,7 @@ class Chromium {
* Overloads puppeteer with useful methods and returns the resolved package.
*/
static get puppeteer(): PuppeteerNode {
for (const overload of ['Browser', 'BrowserContext', 'ElementHandle', 'FrameManager', 'Page']) {
for (const overload of ['Browser', 'BrowserContext', 'ElementHandle', 'Frame', 'Page']) {
require(`${__dirname}/puppeteer/lib/${overload}`);
}

Expand Down
Expand Up @@ -4,9 +4,9 @@ import { KeysOfType, Prototype } from '../../../typings/chrome-aws-lambda';
let Super: Prototype<Frame> = null;

try {
Super = require('puppeteer/lib/cjs/puppeteer/common/FrameManager.js').Frame;
Super = require('puppeteer/lib/cjs/puppeteer/common/Frame.js').Frame;
} catch (error) {
Super = require('puppeteer-core/lib/cjs/puppeteer/common/FrameManager.js').Frame;
Super = require('puppeteer-core/lib/cjs/puppeteer/common/Frame.js').Frame;
}

Super.prototype.clear = function (selector: string) {
Expand Down

0 comments on commit 2b93a80

Please sign in to comment.