question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Make it possible to control the zoom level via the API

See original GitHub issue

Steps to reproduce

It would be great if you could control the zoom level via the API. Perhaps as part of setViewport or with a new function call.

What is the expected result?

You should be able to control the zoom level via the API.

What happens instead?

You cannot control the zoom level 😁

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
aslushnikovcommented, Jun 2, 2019

@JoelEinbinder the zoom discussed here is what we call "scale" in chromium-land.

@36degrees since there’s not much demand for this, I’d recommend you falling back to the raw devtools protocol for this.

There’s a method Emulation.setPageScaleFactor that let’s you do what you want.

BEWARE! Emulation.setPageScaleFactor is an experimental method, so it might change/go away in some future Chromium releases.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({headless: false});
  const page = await browser.newPage();
  await page.goto('https://vanilla.aslushnikov.com');
  const session = await page.target().createCDPSession();
  await session.send('Emulation.setPageScaleFactor', {
    pageScaleFactor: 4, // 400%
  });
})();

If there’s more demand in future, we can actually expose the method to Puppeteer and commit to its support.

Hope this helps.

4reactions
36degreescommented, May 28, 2019

That doesn’t appear to do the same thing as zooming the page – specifically, in my testing at least, it didn’t appear to trigger breakpoints.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Controlling Zoom and Pan | Maps JavaScript API
When a user scrolls a page that contains a map, the scrolling action can unintentionally cause the map to zoom. This behavior can...
Read more >
Using Zoom APIs
Using Zoom API. Zoom API enables developers to request information from Zoom, including (but not limited) to user details, meeting reports, dashboard data, ......
Read more >
Introduction to Zoom API - Zoom App Marketplace
The Zoom API is the primary means for developers to access a collection of resources from Zoom. Apps can read and write to...
Read more >
Room breakout management via API - Zoom Developer Forum
Hi Zoom, Would like to ask if the API can handle a situation like this: Let's say I am subscribed via the Pro...
Read more >
Need to restart Zoom Room computer via API - Feature Requests ...
Hi @apu, Thanks for reaching out about this. At the moment, I'm afraid that our Zoom Rooms API endpoints allow you to control...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found