Type Function Object WebView Library native.* Return value none Revision Release 2024.3703 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( "https://solar2d.com/" )