Webview:onLoaded(success, httpstatus)event


This event is fired when the Webview widget has just finished to load the current web page.

Parameters

Parameters

success

A boolean value that indicates whether page loading was successful or not.

httpstatus

An integer value indicating the HTTP status code.

Return value

The event returns no value.

Example

--! luart-extensions import ui require "webview" -- creates a simple window local win = ui.Window("Webview:onLoaded() event sample", 320, 200) local Webview = ui.Webview(win, { url = "https://www.luart.org" }, 150, 70) -- Use the Webview:onLoaded() event to set the window title function wv:onLoaded(success, status) win.title = wv.title end win:show() -- update the ui while win.visible do ui.update() end