Webview.zoom read/write property
Get or set the Webview horizontal position. The horizontal position start from 0 (left side of the parent widget) and increase to the right (right side of the parent widget).
Example
local ui = require "ui"
require "webview"
-- create a simple window
local win = ui.Window("Webview.zoom sample", 600, 300)
local Webview = ui.Webview(win, { url = "https://www.google.com" })
Webview.align = "all"
-- shows the window
win:show()
-- Zoom in once page is loaded
function Webview:onLoaded()
for i=1, 2, 0.01 do
Webview.zoom = i
ui.update()
end
end
while win.visible do
ui.update()
end