45ab3e0332
This adds a proof-of-concept of `puppeteer-firefox`. This consists of two parts: - `//experimental/juggler` - patches to apply to Firefox. - `//experimental/puppeteer-firefox` - front-end code to be merged with Puppeteer. As things become more stable, we'll gradually move it out of the experimental folder.
29 lines
732 B
TypeScript
29 lines
732 B
TypeScript
import { Connection as RealConnection } from './Connection';
|
|
import { Target as RealTarget } from './Browser';
|
|
import * as child_process from 'child_process';
|
|
declare global {
|
|
module Puppeteer {
|
|
|
|
export interface ConnectionTransport {
|
|
send(string);
|
|
close();
|
|
onmessage?: (message: string) => void,
|
|
onclose?: () => void,
|
|
}
|
|
|
|
export interface ChildProcess extends child_process.ChildProcess { }
|
|
|
|
export type Viewport = {
|
|
width: number;
|
|
height: number;
|
|
deviceScaleFactor?: number;
|
|
isMobile?: boolean;
|
|
isLandscape?: boolean;
|
|
hasTouch?: boolean;
|
|
}
|
|
|
|
export class Connection extends RealConnection { }
|
|
export class Target extends RealTarget { }
|
|
}
|
|
}
|