We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b99bde9 commit f62b47eCopy full SHA for f62b47e
1 file changed
emain/emain-util.ts
@@ -12,6 +12,12 @@ const MinZoomLevel = 0.4;
12
const MaxZoomLevel = 2.6;
13
const ZoomDelta = 0.2;
14
15
+// Note: Chromium automatically syncs zoom factor across all WebContents
16
+// sharing the same origin/session, so we only need to notify renderers
17
+// to update their CSS/state — not call setZoomFactor on each one.
18
+// We broadcast to all WebContents (including devtools, webviews, etc.) but
19
+// that is safe because "zoom-factor-change" is a custom app-defined event
20
+// that only our renderers listen to; unrecognized IPC messages are ignored.
21
function broadcastZoomFactorChanged(newZoomFactor: number): void {
22
for (const wc of electron.webContents.getAllWebContents()) {
23
if (wc.isDestroyed()) {
0 commit comments