Type Number Event urlRequest Revision Current Public Release (2018.3326) Keywords urlRequest, errorCode
An error code if a problem occurred in the URL request of a native.newWebView() or native.showWebPopup() call. Otherwise, returns nil
.
A platform-specific integer for the error which is not language dependent. This property only exists when an error occurs.
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:addEventListener( "urlRequest" , webListener ) |