Using below code,
import CDP from 'chrome-remote-interface';
CDP(async (client) => {
const {Page, Emulation} = client;
await Page.enable();
await Emulation.setPageScaleFactor({ pageScaleFactor: 2 });
await client.close();
})
to zoom the page upto 200%, but facing issue that it is zooming CSS not chrome browser the
document.documentElement.scrollHeight and document.documentElement.scrollWidth remains the same as before only HTML element’s size get’s double in size.
What method to use to zoom the browser so that all of the respective property also changes accordingly?
What library or tools should I use?
I tried
import CDP from 'chrome-remote-interface';
CDP(async (client) => {
const {Page, Emulation} = client;
await Page.enable();
await Emulation.setPageScaleFactor({ pageScaleFactor: 2 });
await client.close();
})
and was expecting that is will zoom the whole browser instead it zoomed CSS.
Konrad Dzwinel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.