This is my test:
require 'webview'
local win = ui.Window('web test', 'dialog', 300, 200)
local web = ui.Webview(win, '', 0, 0, 300, 200)
web.align = "all"
function web:onReady()
web.url = 'https://wttr.in'
print('ready')
end
function web:onLoaded(success, status)
print('onLoaded', success, status)
html = await(web:eval('document.documentElement.outerHTML'))
print(html)
end
win:show()
while win.visible do
ui.update()
end