Type Function Object WebView Library native.* Return value none Revision 2017.3060 Keywords request
Loads the specified URL (string) into the WebView. For local content, you must specify a base system directory as a search path.
object:request( url ) object:request( url, baseDir )
String. The URL to load. For local files, this is a path relative to baseDir
.
Constant. A base directory constant.
On Android, if the web view is displaying web pages from the Internet, you must add the INTERNET
permission to the build.settings
file. This permission is unnecessary if the web view will only be displaying local HTML files that do not access the Internet.
settings = { android = { usesPermissions = { "android.permission.INTERNET", }, }, }
local webView = native.newWebView( 0, 0, 320, 480 ) webView:request( "http://www.coronalabs.com/" )