Vital.sandbox
Webview

self:zoom

Client

Sets the zoom level of the webview


Syntax

local status = self:zoom(value)

Parameters

TypeNameDescription
floatvalueZoom level to apply. 1.0 is the default zoom level

Returns

TypeNameDescription
boolstatustrue on successful execution, or false on failure

Examples

Set various zoom levels on a webview
local browser = webview.create()

--Reset to default zoom
browser:zoom(1.0)

--Zoom in
browser:zoom(1.5)

--Zoom out
browser:zoom(0.75)

On this page