Type String Event urlRequest Revision Release 2024.3703 Keywords urlRequest, errorMessage
A string with an description of an error that occurred in the URL request of a native.newWebView() or native.showWebPopup() call. This property only exists when an error has occurred, otherwise it is undefined. It may be localized depending on the user’s language setting.
local function webListener( event ) if ( event.errorCode ) then native.showAlert( "Error!", event.errorMessage, { "OK" } ) end end local webView = native.newWebView( display.contentCenterX, display.contentCenterY, 320, 480 ) webView:request( "https://solar2d.com/" ) webView:addEventListener( "urlRequest", webListener )