Skip to main content
Module

x/puppeteer_plus/mod.ts>devices

Deno port of puppeteer base on latest TypeScript source.
Go to Latest
variable devices
Re-export
import { devices } from "https://deno.land/x/puppeteer_plus@0.14.0/mod.ts";

A list of devices to be used with page.emulate(options). Actual list of devices can be found in src/common/DeviceDescriptors.ts.

Examples

Example 1

const puppeteer = require('puppeteer');
const iPhone = puppeteer.devices['iPhone 6'];

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.emulate(iPhone);
  await page.goto('https://www.google.com');
  // other actions...
  await browser.close();
})();

type

DevicesMap