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 wv = webview.create()

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

-- Zoom in
wv:zoom(1.5)

-- Zoom out
wv:zoom(0.75)

On this page