Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/frugal/dep/puppeteer/mod.ts>devices

A frugal web framework
Latest
variable devices
Re-export
import { devices } from "https://deno.land/x/frugal@0.9.6/dep/puppeteer/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();
})();