Webview:reload() method


Reload the current web page.

Return value

This function returns no value.

Example

local ui = require "ui" require "webview" -- Uses the weatherwidget.org free widget local win = ui.Window("Webview:reload() sample", "fixed", 436, 276) win.bgcolor = 0xFFFFFF local Webview = ui.Webview(win, "https://www.google.com", 0, 50, 436, 246) local button = ui.Button(win, "Reload the page") button:center() button.y = 10 function button:onClick() Webview:reload() end function Webview:onReady() self:loadstring([[<div id="ww_71ccc3feed2c8" v='1.3' loc='id' a='{"t":"horizontal","lang":"en","sl_lpl":1,"ids":[],"font":"Arial","sl_ics":"one_a","sl_sot":"celsius","cl_bkg":"image","cl_font":"#FFFFFF","cl_cloud":"#FFFFFF","cl_persp":"#81D4FA","cl_sun":"#FFC107","cl_moon":"#FFC107","cl_thund":"#FF5722"}'>Weather Data Source: <a href="https://wetterlang.de/paris_wetter_30_tage/" id="ww_71ccc3feed2c8_u" target="_blank">Paris 30 tage wetter</a></div><script async src="https://app1.weatherwidget.org/js/?id=ww_71ccc3feed2c8"></script>]]) end win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible