Hi,
for webviews
is there a way to read the html content of a webview through the listener (for example print(event.html) or print(event.body))
local function webListener( event ) if event.url then -- print(event.html) or print(event.body) print( "You are visiting: " .. event.url ) end if event.type then print( "The event.type is " .. event.type ) -- print the type of request end if event.errorCode then native.showAlert( "Error!", event.errorMessage, { "OK" } ) end end
webView = native.newWebView( display.contentCenterX, display.contentCenterY-100, display.contentWidth, display.contentHeight-200)
webView:request( "www.coronalabs.com" )
webView:addEventListener( "urlRequest", webListener )