Webview.title readonly
Get the current web page title, represented as a string.
Example
local ui = require "ui"
require "webview"
-- create a simple Webview
local win = ui.Window("Webview.title sample", 640, 480)
local addressbar = ui.Entry(win, "", 0, 6, 640, 24)
local Webview = ui.Webview(win, 0, 30, 640, 430)
function addressbar:onSelect()
Webview.url = addressbar.text
end
-- Set current window title with the page title, once loaded
function Webview:onLoaded()
win.title = Webview.title
end
win:show()
-- update the user interface until the user closes the Window
repeat
ui.update()
until not win.visible