In node electron's BrowserWindow constructor, you can specify webPreferences: { zoomFactor: x }
to zoom the web contents of the window.
Is there a way to modify this when the BrowserWindow has already been created?
And is there a way to specify that the content is not smoothed when zoomed but rather magnified with nearest neighbor?
You can use webContents.setZoomFactor(factor)
The zoom factor is zoom percent divided by 100, so 300% = 3.0.
Ref.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With