From a1f5ca1ad215f95f1c600d0cd40c64c75c0b0744 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 2 Aug 2016 12:26:49 +1000 Subject: [PATCH] Document the zoom methods that are mapped to the webContents object --- docs/api/web-contents.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index be94b1b7553..3121f71fa1e 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -616,6 +616,28 @@ Mute the audio on the current web page. Returns whether this page has been muted. +#### `contents.setZoomFactor(factor)` + +* `factor` Number - Zoom factor. + +Changes the zoom factor to the specified factor. Zoom factor is +zoom percent divided by 100, so 300% = 3.0. + +#### `contents.setZoomLevel(level)` + +* `level` Number - Zoom level + +Changes the zoom level to the specified level. The original size is 0 and each +increment above or below represents zooming 20% larger or smaller to default +limits of 300% and 50% of original size, respectively. + +#### `contents.setZoomLevelLimits(minimumLevel, maximumLevel)` + +* `minimumLevel` Number +* `maximumLevel` Number + +Sets the maximum and minimum zoom level.` + #### `contents.undo()` Executes the editing command `undo` in web page.